@wildboar/pki-stub
Version:
X.510 PKI-Stub ASN.1 data structures in TypeScript
33 lines (32 loc) • 1.59 kB
JavaScript
import * as $ from "@wildboar/asn1/functional";
import { _decode_BuiltInDomainDefinedAttribute, _encode_BuiltInDomainDefinedAttribute, } from "../PkiPmiExternalDataTypes/BuiltInDomainDefinedAttribute.ta.mjs";
let _cached_decoder_for_BuiltInDomainDefinedAttributes = null;
/**
* @summary Decodes an ASN.1 element into a(n) BuiltInDomainDefinedAttributes
* @function
* @param {_Element} el The element being decoded.
* @returns {BuiltInDomainDefinedAttributes} The decoded data structure.
*/
export function _decode_BuiltInDomainDefinedAttributes(el) {
if (!_cached_decoder_for_BuiltInDomainDefinedAttributes) {
_cached_decoder_for_BuiltInDomainDefinedAttributes =
$._decodeSequenceOf(() => _decode_BuiltInDomainDefinedAttribute);
}
return _cached_decoder_for_BuiltInDomainDefinedAttributes(el);
}
let _cached_encoder_for_BuiltInDomainDefinedAttributes = null;
/**
* @summary Encodes a(n) BuiltInDomainDefinedAttributes 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 BuiltInDomainDefinedAttributes, encoded as an ASN.1 Element.
*/
export function _encode_BuiltInDomainDefinedAttributes(value, elGetter) {
if (!_cached_encoder_for_BuiltInDomainDefinedAttributes) {
_cached_encoder_for_BuiltInDomainDefinedAttributes =
$._encodeSequenceOf(() => _encode_BuiltInDomainDefinedAttribute, $.BER);
}
return _cached_encoder_for_BuiltInDomainDefinedAttributes(value, elGetter);
}
/* eslint-enable */