UNPKG

@wildboar/pkcs

Version:
22 lines (21 loc) 1.22 kB
import * as $ from "@wildboar/asn1/functional"; import { _decode_CommonAuthenticationObjectAttributes, _encode_CommonAuthenticationObjectAttributes, } from "../PKCS-15/CommonAuthenticationObjectAttributes.ta.mjs"; import { _get_decoder_for_PKCS15Object, _get_encoder_for_PKCS15Object, } from "../PKCS-15/PKCS15Object.ta.mjs"; /** * @summary Returns a function that will decode an ASN.1 element into a(n) AuthenticationObject * @function * @param {_Element} el The element being decoded. * @returns A function that will decode an ASN.1 element. */ export function _get_decoder_for_AuthenticationObject(_decode_AuthObjectAttributes) { return _get_decoder_for_PKCS15Object(_decode_CommonAuthenticationObjectAttributes, $._decodeNull, _decode_AuthObjectAttributes); } /** * @summary Returns a function that will encode a(n) AuthenticationObject into an ASN.1 Element. * @function * @returns A function that will encode a(n) AuthenticationObject as an ASN.1 element. */ export function _get_encoder_for_AuthenticationObject(_encode_AuthObjectAttributes) { return _get_encoder_for_PKCS15Object(_encode_CommonAuthenticationObjectAttributes, $._encodeNull, _encode_AuthObjectAttributes); } /* eslint-enable */