UNPKG

@wildboar/pkcs

Version:
42 lines 1.48 kB
import { ASN1Element as _Element } from "@wildboar/asn1"; import * as $ from "@wildboar/asn1/functional"; import { KEKRecipientInfo } from "../CryptographicMessageSyntax/KEKRecipientInfo.ta.mjs"; import { KeyAgreeRecipientInfo } from "../CryptographicMessageSyntax/KeyAgreeRecipientInfo.ta.mjs"; import { KeyTransRecipientInfo } from "../CryptographicMessageSyntax/KeyTransRecipientInfo.ta.mjs"; /** * @summary RecipientInfo * @description * * ### ASN.1 Definition: * * ```asn1 * RecipientInfo ::= CHOICE { * ktri KeyTransRecipientInfo, * kari [1] KeyAgreeRecipientInfo, * kekri [2] KEKRecipientInfo * } * ``` */ export type RecipientInfo = { ktri: KeyTransRecipientInfo; } | { kari: KeyAgreeRecipientInfo; } | { kekri: KEKRecipientInfo; }; /** * @summary Decodes an ASN.1 element into a(n) RecipientInfo * @function * @param {_Element} el The element being decoded. * @returns {RecipientInfo} The decoded data structure. */ export declare function _decode_RecipientInfo(el: _Element): RecipientInfo; /** * @summary Encodes a(n) RecipientInfo 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 RecipientInfo, encoded as an ASN.1 Element. */ export declare function _encode_RecipientInfo(value: RecipientInfo, elGetter: $.ASN1Encoder<RecipientInfo>): _Element; //# sourceMappingURL=RecipientInfo.ta.d.mts.map