@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
45 lines (44 loc) • 2.08 kB
TypeScript
import { ASN1Element as _Element } from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import { KeyAgreementRecipientInfo } from "../PKCS7/KeyAgreementRecipientInfo.ta";
import { KeyEncryptionKeyRecipientInfo } from "../PKCS7/KeyEncryptionKeyRecipientInfo.ta";
import { KeyTransportRecipientInfo } from "../PKCS7/KeyTransportRecipientInfo.ta";
export { KeyAgreementRecipientInfo, _decode_KeyAgreementRecipientInfo, _encode_KeyAgreementRecipientInfo, } from "../PKCS7/KeyAgreementRecipientInfo.ta";
export { KeyEncryptionKeyRecipientInfo, _decode_KeyEncryptionKeyRecipientInfo, _encode_KeyEncryptionKeyRecipientInfo, } from "../PKCS7/KeyEncryptionKeyRecipientInfo.ta";
export { KeyTransportRecipientInfo, _decode_KeyTransportRecipientInfo, _encode_KeyTransportRecipientInfo, } from "../PKCS7/KeyTransportRecipientInfo.ta";
/**
* @summary RecipientInfo
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* RecipientInfo ::= CHOICE {
* keyTransportRecipientInfo KeyTransportRecipientInfo,
* keyAgreementRecipientInfo [1] KeyAgreementRecipientInfo,
* keyEncryptionKeyRecipientInfo [2] KeyEncryptionKeyRecipientInfo
* }
* ```
*/
export declare 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} el The element being decoded.
* @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;