@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
159 lines • 4.74 kB
text/typescript
import { ASN1Element as _Element, OPTIONAL } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { CertificateRevocationLists } from "../CryptographicMessageSyntax/CertificateRevocationLists.ta.mjs";
import { CertificateSet } from "../CryptographicMessageSyntax/CertificateSet.ta.mjs";
import { CMSVersion } from "../CryptographicMessageSyntax/CMSVersion.ta.mjs";
import { DigestAlgorithmIdentifiers } from "../CryptographicMessageSyntax/DigestAlgorithmIdentifiers.ta.mjs";
import { EncapsulatedContentInfo } from "../CryptographicMessageSyntax/EncapsulatedContentInfo.ta.mjs";
import { SignerInfos } from "../CryptographicMessageSyntax/SignerInfos.ta.mjs";
/**
* @summary SignedData
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* SignedData ::= SEQUENCE {
* version CMSVersion,
* digestAlgorithms DigestAlgorithmIdentifiers,
* encapContentInfo EncapsulatedContentInfo,
* certificates [0] IMPLICIT CertificateSet OPTIONAL,
* crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
* signerInfos SignerInfos
* }
* ```
*
*/
export declare class SignedData {
/**
* @summary `version`.
* @public
* @readonly
*/
readonly version: CMSVersion;
/**
* @summary `digestAlgorithms`.
* @public
* @readonly
*/
readonly digestAlgorithms: DigestAlgorithmIdentifiers;
/**
* @summary `encapContentInfo`.
* @public
* @readonly
*/
readonly encapContentInfo: EncapsulatedContentInfo;
/**
* @summary `certificates`.
* @public
* @readonly
*/
readonly certificates: OPTIONAL<CertificateSet>;
/**
* @summary `crls`.
* @public
* @readonly
*/
readonly crls: OPTIONAL<CertificateRevocationLists>;
/**
* @summary `signerInfos`.
* @public
* @readonly
*/
readonly signerInfos: SignerInfos;
constructor(
/**
* @summary `version`.
* @public
* @readonly
*/
version: CMSVersion,
/**
* @summary `digestAlgorithms`.
* @public
* @readonly
*/
digestAlgorithms: DigestAlgorithmIdentifiers,
/**
* @summary `encapContentInfo`.
* @public
* @readonly
*/
encapContentInfo: EncapsulatedContentInfo,
/**
* @summary `certificates`.
* @public
* @readonly
*/
certificates: OPTIONAL<CertificateSet>,
/**
* @summary `crls`.
* @public
* @readonly
*/
crls: OPTIONAL<CertificateRevocationLists>,
/**
* @summary `signerInfos`.
* @public
* @readonly
*/
signerInfos: SignerInfos);
/**
* @summary Restructures an object into a SignedData
* @description
*
* This takes an `object` and converts it to a `SignedData`.
*
* @public
* @static
* @method
* @param {Object} _o An object having all of the keys and values of a `SignedData`.
* @returns {SignedData}
*/
static _from_object(_o: {
[_K in keyof SignedData]: SignedData[_K];
}): SignedData;
}
/**
* @summary The Leading Root Component Types of SignedData
* @description
*
* This is an array of `ComponentSpec`s that define how to decode the leading root component type list of a SET or SEQUENCE.
*
* @constant
*/
export declare const _root_component_type_list_1_spec_for_SignedData: $.ComponentSpec[];
/**
* @summary The Trailing Root Component Types of SignedData
* @description
*
* This is an array of `ComponentSpec`s that define how to decode the trailing root component type list of a SET or SEQUENCE.
*
* @constant
*/
export declare const _root_component_type_list_2_spec_for_SignedData: $.ComponentSpec[];
/**
* @summary The Extension Addition Component Types of SignedData
* @description
*
* This is an array of `ComponentSpec`s that define how to decode the extension addition component type list of a SET or SEQUENCE.
*
* @constant
*/
export declare const _extension_additions_list_spec_for_SignedData: $.ComponentSpec[];
/**
* @summary Decodes an ASN.1 element into a(n) SignedData
* @function
* @param {_Element} el The element being decoded.
* @returns {SignedData} The decoded data structure.
*/
export declare function _decode_SignedData(el: _Element): SignedData;
/**
* @summary Encodes a(n) SignedData 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 SignedData, encoded as an ASN.1 Element.
*/
export declare function _encode_SignedData(value: SignedData, elGetter: $.ASN1Encoder<SignedData>): _Element;
//# sourceMappingURL=SignedData.ta.d.mts.map