UNPKG

@wildboar/pkcs

Version:
119 lines (118 loc) 4.04 kB
import { ASN1Element as _Element, GeneralizedTime, OPTIONAL } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { OtherKeyAttribute } from "../CryptographicMessageSyntax/OtherKeyAttribute.ta"; import { SubjectKeyIdentifier } from "../CryptographicMessageSyntax/SubjectKeyIdentifier.ta"; export { OtherKeyAttribute, _decode_OtherKeyAttribute, _encode_OtherKeyAttribute, } from "../CryptographicMessageSyntax/OtherKeyAttribute.ta"; export { SubjectKeyIdentifier, _decode_SubjectKeyIdentifier, _encode_SubjectKeyIdentifier, } from "../CryptographicMessageSyntax/SubjectKeyIdentifier.ta"; /** * @summary RecipientKeyIdentifier * @description * * ### ASN.1 Definition: * * ```asn1 * RecipientKeyIdentifier ::= SEQUENCE { * subjectKeyIdentifier SubjectKeyIdentifier, * date GeneralizedTime OPTIONAL, * other OtherKeyAttribute OPTIONAL * } * ``` * * @class */ export declare class RecipientKeyIdentifier { /** * @summary `subjectKeyIdentifier`. * @public * @readonly */ readonly subjectKeyIdentifier: SubjectKeyIdentifier; /** * @summary `date`. * @public * @readonly */ readonly date: OPTIONAL<GeneralizedTime>; /** * @summary `other`. * @public * @readonly */ readonly other: OPTIONAL<OtherKeyAttribute>; constructor( /** * @summary `subjectKeyIdentifier`. * @public * @readonly */ subjectKeyIdentifier: SubjectKeyIdentifier, /** * @summary `date`. * @public * @readonly */ date: OPTIONAL<GeneralizedTime>, /** * @summary `other`. * @public * @readonly */ other: OPTIONAL<OtherKeyAttribute>); /** * @summary Restructures an object into a RecipientKeyIdentifier * @description * * This takes an `object` and converts it to a `RecipientKeyIdentifier`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `RecipientKeyIdentifier`. * @returns {RecipientKeyIdentifier} */ static _from_object(_o: { [_K in keyof RecipientKeyIdentifier]: RecipientKeyIdentifier[_K]; }): RecipientKeyIdentifier; } /** * @summary The Leading Root Component Types of RecipientKeyIdentifier * @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_RecipientKeyIdentifier: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of RecipientKeyIdentifier * @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_RecipientKeyIdentifier: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of RecipientKeyIdentifier * @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_RecipientKeyIdentifier: $.ComponentSpec[]; /** * @summary Decodes an ASN.1 element into a(n) RecipientKeyIdentifier * @function * @param {_Element} el The element being decoded. * @returns {RecipientKeyIdentifier} The decoded data structure. */ export declare function _decode_RecipientKeyIdentifier(el: _Element): RecipientKeyIdentifier; /** * @summary Encodes a(n) RecipientKeyIdentifier 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 RecipientKeyIdentifier, encoded as an ASN.1 Element. */ export declare function _encode_RecipientKeyIdentifier(value: RecipientKeyIdentifier, elGetter: $.ASN1Encoder<RecipientKeyIdentifier>): _Element;