UNPKG

@wildboar/pkcs

Version:
104 lines (103 loc) 3.43 kB
import { ASN1Element as _Element, OCTET_STRING, OPTIONAL } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { ContentType } from "../CryptographicMessageSyntax/ContentType.ta"; export { ContentType, _decode_ContentType, _encode_ContentType, } from "../CryptographicMessageSyntax/ContentType.ta"; /** * @summary EncapsulatedContentInfo * @description * * ### ASN.1 Definition: * * ```asn1 * EncapsulatedContentInfo ::= SEQUENCE { * eContentType ContentType, * eContent [0] EXPLICIT OCTET STRING OPTIONAL * } * ``` * * @class */ export declare class EncapsulatedContentInfo { /** * @summary `eContentType`. * @public * @readonly */ readonly eContentType: ContentType; /** * @summary `eContent`. * @public * @readonly */ readonly eContent: OPTIONAL<OCTET_STRING>; constructor( /** * @summary `eContentType`. * @public * @readonly */ eContentType: ContentType, /** * @summary `eContent`. * @public * @readonly */ eContent: OPTIONAL<OCTET_STRING>); /** * @summary Restructures an object into a EncapsulatedContentInfo * @description * * This takes an `object` and converts it to a `EncapsulatedContentInfo`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `EncapsulatedContentInfo`. * @returns {EncapsulatedContentInfo} */ static _from_object(_o: { [_K in keyof EncapsulatedContentInfo]: EncapsulatedContentInfo[_K]; }): EncapsulatedContentInfo; } /** * @summary The Leading Root Component Types of EncapsulatedContentInfo * @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_EncapsulatedContentInfo: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of EncapsulatedContentInfo * @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_EncapsulatedContentInfo: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of EncapsulatedContentInfo * @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_EncapsulatedContentInfo: $.ComponentSpec[]; /** * @summary Decodes an ASN.1 element into a(n) EncapsulatedContentInfo * @function * @param {_Element} el The element being decoded. * @returns {EncapsulatedContentInfo} The decoded data structure. */ export declare function _decode_EncapsulatedContentInfo(el: _Element): EncapsulatedContentInfo; /** * @summary Encodes a(n) EncapsulatedContentInfo 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 EncapsulatedContentInfo, encoded as an ASN.1 Element. */ export declare function _encode_EncapsulatedContentInfo(value: EncapsulatedContentInfo, elGetter: $.ASN1Encoder<EncapsulatedContentInfo>): _Element;