@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
45 lines (44 loc) • 1.89 kB
TypeScript
import { ASN1Element as _Element } from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import { KEKRecipientInfo } from "../CryptographicMessageSyntax/KEKRecipientInfo.ta";
import { KeyAgreeRecipientInfo } from "../CryptographicMessageSyntax/KeyAgreeRecipientInfo.ta";
import { KeyTransRecipientInfo } from "../CryptographicMessageSyntax/KeyTransRecipientInfo.ta";
export { KEKRecipientInfo, _decode_KEKRecipientInfo, _encode_KEKRecipientInfo, } from "../CryptographicMessageSyntax/KEKRecipientInfo.ta";
export { KeyAgreeRecipientInfo, _decode_KeyAgreeRecipientInfo, _encode_KeyAgreeRecipientInfo, } from "../CryptographicMessageSyntax/KeyAgreeRecipientInfo.ta";
export { KeyTransRecipientInfo, _decode_KeyTransRecipientInfo, _encode_KeyTransRecipientInfo, } from "../CryptographicMessageSyntax/KeyTransRecipientInfo.ta";
/**
* @summary RecipientInfo
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* RecipientInfo ::= CHOICE {
* ktri KeyTransRecipientInfo,
* kari [1] KeyAgreeRecipientInfo,
* kekri [2] KEKRecipientInfo
* }
* ```
*/
export declare 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} 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;