UNPKG

@wildboar/pki-stub

Version:
33 lines (32 loc) 1.34 kB
import * as $ from "@wildboar/asn1/functional"; import { _decode_ScopeRestriction, _encode_ScopeRestriction, } from "../AuthenticationFramework/ScopeRestriction.ta.mjs"; let _cached_decoder_for_ScopeRestrictions = null; /** * @summary Decodes an ASN.1 element into a(n) ScopeRestrictions * @function * @param {_Element} el The element being decoded. * @returns {ScopeRestrictions} The decoded data structure. */ export function _decode_ScopeRestrictions(el) { if (!_cached_decoder_for_ScopeRestrictions) { _cached_decoder_for_ScopeRestrictions = $._decodeSequenceOf(() => _decode_ScopeRestriction); } return _cached_decoder_for_ScopeRestrictions(el); } let _cached_encoder_for_ScopeRestrictions = null; /** * @summary Encodes a(n) ScopeRestrictions 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 ScopeRestrictions, encoded as an ASN.1 Element. */ export function _encode_ScopeRestrictions(value, elGetter) { if (!_cached_encoder_for_ScopeRestrictions) { _cached_encoder_for_ScopeRestrictions = $._encodeSequenceOf(() => _encode_ScopeRestriction, $.BER); } return _cached_encoder_for_ScopeRestrictions(value, elGetter); } /* eslint-enable */