UNPKG

@wildboar/pkcs

Version:
44 lines 1.77 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._encode_PublicKey = exports._decode_PublicKey = void 0; const $ = require("asn1-ts/dist/node/functional"); /* END_OF_SYMBOL_DEFINITION PublicKey */ /* START_OF_SYMBOL_DEFINITION _cached_decoder_for_PublicKey */ let _cached_decoder_for_PublicKey = null; /* END_OF_SYMBOL_DEFINITION _cached_decoder_for_PublicKey */ /* START_OF_SYMBOL_DEFINITION _decode_PublicKey */ /** * @summary Decodes an ASN.1 element into a(n) PublicKey * @function * @param {_Element} el The element being decoded. * @returns {PublicKey} The decoded data structure. */ function _decode_PublicKey(el) { if (!_cached_decoder_for_PublicKey) { _cached_decoder_for_PublicKey = $._decodeBitString; } return _cached_decoder_for_PublicKey(el); } exports._decode_PublicKey = _decode_PublicKey; /* END_OF_SYMBOL_DEFINITION _decode_PublicKey */ /* START_OF_SYMBOL_DEFINITION _cached_encoder_for_PublicKey */ let _cached_encoder_for_PublicKey = null; /* END_OF_SYMBOL_DEFINITION _cached_encoder_for_PublicKey */ /* START_OF_SYMBOL_DEFINITION _encode_PublicKey */ /** * @summary Encodes a(n) PublicKey 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 PublicKey, encoded as an ASN.1 Element. */ function _encode_PublicKey(value, elGetter) { if (!_cached_encoder_for_PublicKey) { _cached_encoder_for_PublicKey = $._encodeBitString; } return _cached_encoder_for_PublicKey(value, elGetter); } exports._encode_PublicKey = _encode_PublicKey; /* END_OF_SYMBOL_DEFINITION _encode_PublicKey */ /* eslint-enable */ //# sourceMappingURL=PublicKey.ta.js.map