UNPKG

@wildboar/pkcs

Version:
38 lines 1.58 kB
import * as $ from "@wildboar/asn1/functional"; import { KeyInfo_paramsAndOps } from "../PKCS-15/KeyInfo-paramsAndOps.ta.mjs"; import { Reference } from "../PKCS-15/Reference.ta.mjs"; /** * @summary KeyInfo * @description * * ### ASN.1 Definition: * * ```asn1 * KeyInfo {ParameterType, OperationsType} ::= CHOICE { * reference Reference, * paramsAndOps SEQUENCE { * parameters ParameterType, * supportedOperations OperationsType OPTIONAL * } * } * ``` */ export type KeyInfo<ParameterType, OperationsType> = { reference: Reference; } | { paramsAndOps: KeyInfo_paramsAndOps<ParameterType, OperationsType>; }; /** * @summary Returns a function that will decode an ASN.1 element into a(n) KeyInfo * @function * @param {_Element} el The element being decoded. * @returns A function that will decode an ASN.1 element. */ export declare function _get_decoder_for_KeyInfo<ParameterType, OperationsType>(_decode_ParameterType: $.ASN1Decoder<ParameterType>, _decode_OperationsType: $.ASN1Decoder<OperationsType>): $.ASN1Decoder<KeyInfo<ParameterType, OperationsType>>; /** * @summary Returns a function that will encode a(n) KeyInfo into an ASN.1 Element. * @function * @returns A function that will encode a(n) KeyInfo as an ASN.1 element. */ export declare function _get_encoder_for_KeyInfo<ParameterType, OperationsType>(_encode_ParameterType: $.ASN1Encoder<ParameterType>, _encode_OperationsType: $.ASN1Encoder<OperationsType>): $.ASN1Encoder<KeyInfo<ParameterType, OperationsType>>; //# sourceMappingURL=KeyInfo.ta.d.mts.map