@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
42 lines • 1.65 kB
text/typescript
import { ASN1Element as _Element } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { KeyAgreementRecipientInfo } from "../PKCS7/KeyAgreementRecipientInfo.ta.mjs";
import { KeyEncryptionKeyRecipientInfo } from "../PKCS7/KeyEncryptionKeyRecipientInfo.ta.mjs";
import { KeyTransportRecipientInfo } from "../PKCS7/KeyTransportRecipientInfo.ta.mjs";
/**
* @summary RecipientInfo
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* RecipientInfo ::= CHOICE {
* keyTransportRecipientInfo KeyTransportRecipientInfo,
* keyAgreementRecipientInfo [1] KeyAgreementRecipientInfo,
* keyEncryptionKeyRecipientInfo [2] KeyEncryptionKeyRecipientInfo
* }
* ```
*/
export type RecipientInfo = {
keyTransportRecipientInfo: KeyTransportRecipientInfo;
} | {
keyAgreementRecipientInfo: KeyAgreementRecipientInfo;
} | {
keyEncryptionKeyRecipientInfo: KeyEncryptionKeyRecipientInfo;
};
/**
* @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