@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
44 lines • 1.86 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_ECPrivateKey = exports._decode_ECPrivateKey = void 0;
const $ = require("asn1-ts/dist/node/functional");
/* END_OF_SYMBOL_DEFINITION ECPrivateKey */
/* START_OF_SYMBOL_DEFINITION _cached_decoder_for_ECPrivateKey */
let _cached_decoder_for_ECPrivateKey = null;
/* END_OF_SYMBOL_DEFINITION _cached_decoder_for_ECPrivateKey */
/* START_OF_SYMBOL_DEFINITION _decode_ECPrivateKey */
/**
* @summary Decodes an ASN.1 element into a(n) ECPrivateKey
* @function
* @param {_Element} el The element being decoded.
* @returns {ECPrivateKey} The decoded data structure.
*/
function _decode_ECPrivateKey(el) {
if (!_cached_decoder_for_ECPrivateKey) {
_cached_decoder_for_ECPrivateKey = $._decodeInteger;
}
return _cached_decoder_for_ECPrivateKey(el);
}
exports._decode_ECPrivateKey = _decode_ECPrivateKey;
/* END_OF_SYMBOL_DEFINITION _decode_ECPrivateKey */
/* START_OF_SYMBOL_DEFINITION _cached_encoder_for_ECPrivateKey */
let _cached_encoder_for_ECPrivateKey = null;
/* END_OF_SYMBOL_DEFINITION _cached_encoder_for_ECPrivateKey */
/* START_OF_SYMBOL_DEFINITION _encode_ECPrivateKey */
/**
* @summary Encodes a(n) ECPrivateKey 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 ECPrivateKey, encoded as an ASN.1 Element.
*/
function _encode_ECPrivateKey(value, elGetter) {
if (!_cached_encoder_for_ECPrivateKey) {
_cached_encoder_for_ECPrivateKey = $._encodeInteger;
}
return _cached_encoder_for_ECPrivateKey(value, elGetter);
}
exports._encode_ECPrivateKey = _encode_ECPrivateKey;
/* END_OF_SYMBOL_DEFINITION _encode_ECPrivateKey */
/* eslint-enable */
//# sourceMappingURL=ECPrivateKey.ta.js.map