@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
22 lines (21 loc) • 1.14 kB
JavaScript
import * as $ from "@wildboar/asn1/functional";
import { _decode_CommonCertificateAttributes, _encode_CommonCertificateAttributes, } from "../PKCS-15/CommonCertificateAttributes.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) CertificateObject
* @function
* @param {_Element} el The element being decoded.
* @returns A function that will decode an ASN.1 element.
*/
export function _get_decoder_for_CertificateObject(_decode_CertAttributes) {
return _get_decoder_for_PKCS15Object(_decode_CommonCertificateAttributes, $._decodeNull, _decode_CertAttributes);
}
/**
* @summary Returns a function that will encode a(n) CertificateObject into an ASN.1 Element.
* @function
* @returns A function that will encode a(n) CertificateObject as an ASN.1 element.
*/
export function _get_encoder_for_CertificateObject(_encode_CertAttributes) {
return _get_encoder_for_PKCS15Object(_encode_CommonCertificateAttributes, $._encodeNull, _encode_CertAttributes);
}
/* eslint-enable */