UNPKG

@wildboar/pkcs

Version:
31 lines (30 loc) 1.42 kB
import * as $ from "@wildboar/asn1/functional"; import { _decode_RecipientEncryptedKey, _encode_RecipientEncryptedKey, } from "../CryptographicMessageSyntax/RecipientEncryptedKey.ta.mjs"; let _cached_decoder_for_RecipientEncryptedKeys = null; /** * @summary Decodes an ASN.1 element into a(n) RecipientEncryptedKeys * @function * @param {_Element} el The element being decoded. * @returns {RecipientEncryptedKeys} The decoded data structure. */ export function _decode_RecipientEncryptedKeys(el) { if (!_cached_decoder_for_RecipientEncryptedKeys) { _cached_decoder_for_RecipientEncryptedKeys = $._decodeSequenceOf(() => _decode_RecipientEncryptedKey); } return _cached_decoder_for_RecipientEncryptedKeys(el); } let _cached_encoder_for_RecipientEncryptedKeys = null; /** * @summary Encodes a(n) RecipientEncryptedKeys into an ASN.1 Element. * @function * @param value The element being encoded. * @param elGetter A function that can be used to get new ASN.1 elements. * @returns {_Element} The RecipientEncryptedKeys, encoded as an ASN.1 Element. */ export function _encode_RecipientEncryptedKeys(value, elGetter) { if (!_cached_encoder_for_RecipientEncryptedKeys) { _cached_encoder_for_RecipientEncryptedKeys = $._encodeSequenceOf(() => _encode_RecipientEncryptedKey, $.BER); } return _cached_encoder_for_RecipientEncryptedKeys(value, elGetter); } /* eslint-enable */