@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
44 lines • 1.81 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_PrivateKey = exports._decode_PrivateKey = void 0;
const $ = require("asn1-ts/dist/node/functional");
/* END_OF_SYMBOL_DEFINITION PrivateKey */
/* START_OF_SYMBOL_DEFINITION _cached_decoder_for_PrivateKey */
let _cached_decoder_for_PrivateKey = null;
/* END_OF_SYMBOL_DEFINITION _cached_decoder_for_PrivateKey */
/* START_OF_SYMBOL_DEFINITION _decode_PrivateKey */
/**
* @summary Decodes an ASN.1 element into a(n) PrivateKey
* @function
* @param {_Element} el The element being decoded.
* @returns {PrivateKey} The decoded data structure.
*/
function _decode_PrivateKey(el) {
if (!_cached_decoder_for_PrivateKey) {
_cached_decoder_for_PrivateKey = $._decodeOctetString;
}
return _cached_decoder_for_PrivateKey(el);
}
exports._decode_PrivateKey = _decode_PrivateKey;
/* END_OF_SYMBOL_DEFINITION _decode_PrivateKey */
/* START_OF_SYMBOL_DEFINITION _cached_encoder_for_PrivateKey */
let _cached_encoder_for_PrivateKey = null;
/* END_OF_SYMBOL_DEFINITION _cached_encoder_for_PrivateKey */
/* START_OF_SYMBOL_DEFINITION _encode_PrivateKey */
/**
* @summary Encodes a(n) PrivateKey into an ASN.1 Element.
* @function
* @param {value} el The element being decoded.
* @param elGetter A function that can be used to get new ASN.1 elements.
* @returns {_Element} The PrivateKey, encoded as an ASN.1 Element.
*/
function _encode_PrivateKey(value, elGetter) {
if (!_cached_encoder_for_PrivateKey) {
_cached_encoder_for_PrivateKey = $._encodeOctetString;
}
return _cached_encoder_for_PrivateKey(value, elGetter);
}
exports._encode_PrivateKey = _encode_PrivateKey;
/* END_OF_SYMBOL_DEFINITION _encode_PrivateKey */
/* eslint-enable */
//# sourceMappingURL=PrivateKey.ta.js.map