1 line
2.5 KiB
JSON
1 line
2.5 KiB
JSON
{"ast":null,"code":"'use strict';\n\nconst inherits = require('inherits');\n\nconst DEREncoder = require('./der');\n\nfunction PEMEncoder(entity) {\n DEREncoder.call(this, entity);\n this.enc = 'pem';\n}\n\ninherits(PEMEncoder, DEREncoder);\nmodule.exports = PEMEncoder;\n\nPEMEncoder.prototype.encode = function encode(data, options) {\n const buf = DEREncoder.prototype.encode.call(this, data);\n const p = buf.toString('base64');\n const out = ['-----BEGIN ' + options.label + '-----'];\n\n for (let i = 0; i < p.length; i += 64) out.push(p.slice(i, i + 64));\n\n out.push('-----END ' + options.label + '-----');\n return out.join('\\n');\n};","map":{"version":3,"sources":["/Users/tylerkoenig/Code/personal/react-scss2/node_modules/asn1.js/lib/asn1/encoders/pem.js"],"names":["inherits","require","DEREncoder","PEMEncoder","entity","call","enc","module","exports","prototype","encode","data","options","buf","p","toString","out","label","i","length","push","slice","join"],"mappings":"AAAA;;AAEA,MAAMA,QAAQ,GAAGC,OAAO,CAAC,UAAD,CAAxB;;AAEA,MAAMC,UAAU,GAAGD,OAAO,CAAC,OAAD,CAA1B;;AAEA,SAASE,UAAT,CAAoBC,MAApB,EAA4B;AAC1BF,EAAAA,UAAU,CAACG,IAAX,CAAgB,IAAhB,EAAsBD,MAAtB;AACA,OAAKE,GAAL,GAAW,KAAX;AACD;;AACDN,QAAQ,CAACG,UAAD,EAAaD,UAAb,CAAR;AACAK,MAAM,CAACC,OAAP,GAAiBL,UAAjB;;AAEAA,UAAU,CAACM,SAAX,CAAqBC,MAArB,GAA8B,SAASA,MAAT,CAAgBC,IAAhB,EAAsBC,OAAtB,EAA+B;AAC3D,QAAMC,GAAG,GAAGX,UAAU,CAACO,SAAX,CAAqBC,MAArB,CAA4BL,IAA5B,CAAiC,IAAjC,EAAuCM,IAAvC,CAAZ;AAEA,QAAMG,CAAC,GAAGD,GAAG,CAACE,QAAJ,CAAa,QAAb,CAAV;AACA,QAAMC,GAAG,GAAG,CAAE,gBAAgBJ,OAAO,CAACK,KAAxB,GAAgC,OAAlC,CAAZ;;AACA,OAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGJ,CAAC,CAACK,MAAtB,EAA8BD,CAAC,IAAI,EAAnC,EACEF,GAAG,CAACI,IAAJ,CAASN,CAAC,CAACO,KAAF,CAAQH,CAAR,EAAWA,CAAC,GAAG,EAAf,CAAT;;AACFF,EAAAA,GAAG,CAACI,IAAJ,CAAS,cAAcR,OAAO,CAACK,KAAtB,GAA8B,OAAvC;AACA,SAAOD,GAAG,CAACM,IAAJ,CAAS,IAAT,CAAP;AACD,CATD","sourcesContent":["'use strict';\n\nconst inherits = require('inherits');\n\nconst DEREncoder = require('./der');\n\nfunction PEMEncoder(entity) {\n DEREncoder.call(this, entity);\n this.enc = 'pem';\n}\ninherits(PEMEncoder, DEREncoder);\nmodule.exports = PEMEncoder;\n\nPEMEncoder.prototype.encode = function encode(data, options) {\n const buf = DEREncoder.prototype.encode.call(this, data);\n\n const p = buf.toString('base64');\n const out = [ '-----BEGIN ' + options.label + '-----' ];\n for (let i = 0; i < p.length; i += 64)\n out.push(p.slice(i, i + 64));\n out.push('-----END ' + options.label + '-----');\n return out.join('\\n');\n};\n"]},"metadata":{},"sourceType":"script"} |