UNPKG

@wildboar/pkcs

Version:
22 lines (21 loc) 1.22 kB
import { _decode_CommonKeyAttributes, _encode_CommonKeyAttributes, } from "../PKCS-15/CommonKeyAttributes.ta.mjs"; import { _decode_CommonPrivateKeyAttributes, _encode_CommonPrivateKeyAttributes, } from "../PKCS-15/CommonPrivateKeyAttributes.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) PrivateKeyObject * @function * @param {_Element} el The element being decoded. * @returns A function that will decode an ASN.1 element. */ export function _get_decoder_for_PrivateKeyObject(_decode_KeyAttributes) { return _get_decoder_for_PKCS15Object(_decode_CommonKeyAttributes, _decode_CommonPrivateKeyAttributes, _decode_KeyAttributes); } /** * @summary Returns a function that will encode a(n) PrivateKeyObject into an ASN.1 Element. * @function * @returns A function that will encode a(n) PrivateKeyObject as an ASN.1 element. */ export function _get_encoder_for_PrivateKeyObject(_encode_KeyAttributes) { return _get_encoder_for_PKCS15Object(_encode_CommonKeyAttributes, _encode_CommonPrivateKeyAttributes, _encode_KeyAttributes); } /* eslint-enable */