UNPKG

@wildboar/pkcs

Version:
48 lines 2.66 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._encode_HashAlgorithm = exports._decode_HashAlgorithm = exports._encode_AlgorithmIdentifier = exports._decode_AlgorithmIdentifier = exports.AlgorithmIdentifier = void 0; const AlgorithmIdentifier_ta_1 = require("../PKCS-1/AlgorithmIdentifier.ta"); var AlgorithmIdentifier_ta_2 = require("../PKCS-1/AlgorithmIdentifier.ta"); Object.defineProperty(exports, "AlgorithmIdentifier", { enumerable: true, get: function () { return AlgorithmIdentifier_ta_2.AlgorithmIdentifier; } }); Object.defineProperty(exports, "_decode_AlgorithmIdentifier", { enumerable: true, get: function () { return AlgorithmIdentifier_ta_2._decode_AlgorithmIdentifier; } }); Object.defineProperty(exports, "_encode_AlgorithmIdentifier", { enumerable: true, get: function () { return AlgorithmIdentifier_ta_2._encode_AlgorithmIdentifier; } }); /* END_OF_SYMBOL_DEFINITION HashAlgorithm */ /* START_OF_SYMBOL_DEFINITION _cached_decoder_for_HashAlgorithm */ let _cached_decoder_for_HashAlgorithm = null; /* END_OF_SYMBOL_DEFINITION _cached_decoder_for_HashAlgorithm */ /* START_OF_SYMBOL_DEFINITION _decode_HashAlgorithm */ /** * @summary Decodes an ASN.1 element into a(n) HashAlgorithm * @function * @param {_Element} el The element being decoded. * @returns {HashAlgorithm} The decoded data structure. */ function _decode_HashAlgorithm(el) { if (!_cached_decoder_for_HashAlgorithm) { _cached_decoder_for_HashAlgorithm = AlgorithmIdentifier_ta_1._decode_AlgorithmIdentifier; } return _cached_decoder_for_HashAlgorithm(el); } exports._decode_HashAlgorithm = _decode_HashAlgorithm; /* END_OF_SYMBOL_DEFINITION _decode_HashAlgorithm */ /* START_OF_SYMBOL_DEFINITION _cached_encoder_for_HashAlgorithm */ let _cached_encoder_for_HashAlgorithm = null; /* END_OF_SYMBOL_DEFINITION _cached_encoder_for_HashAlgorithm */ /* START_OF_SYMBOL_DEFINITION _encode_HashAlgorithm */ /** * @summary Encodes a(n) HashAlgorithm 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 HashAlgorithm, encoded as an ASN.1 Element. */ function _encode_HashAlgorithm(value, elGetter) { if (!_cached_encoder_for_HashAlgorithm) { _cached_encoder_for_HashAlgorithm = AlgorithmIdentifier_ta_1._encode_AlgorithmIdentifier; } return _cached_encoder_for_HashAlgorithm(value, elGetter); } exports._encode_HashAlgorithm = _encode_HashAlgorithm; /* END_OF_SYMBOL_DEFINITION _encode_HashAlgorithm */ /* eslint-enable */ //# sourceMappingURL=HashAlgorithm.ta.js.map