UNPKG

@wildboar/pki-stub

Version:
113 lines (112 loc) 3.62 kB
import { BIT_STRING, ASN1Element as _Element } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { AlgorithmIdentifier } from "../PKI-Stub/AlgorithmIdentifier.ta"; /** * @summary FingerPrint * @description * * ### ASN.1 Definition: * * ```asn1 * FingerPrint {ToBeFingerprinted} ::= SEQUENCE { * algorithmIdentifier AlgorithmIdentifier{{SupportedAlgorithms}}, * fingerprint BIT STRING, * ... } * ``` * * @class */ export declare class FingerPrint<ToBeFingerprinted> { /** * @summary `algorithmIdentifier`. * @public * @readonly */ readonly algorithmIdentifier: AlgorithmIdentifier; /** * @summary `fingerprint`. * @public * @readonly */ readonly fingerprint: BIT_STRING; /** * @summary Extensions that are not recognized. * @public * @readonly */ readonly _unrecognizedExtensionsList: _Element[]; constructor( /** * @summary `algorithmIdentifier`. * @public * @readonly */ algorithmIdentifier: AlgorithmIdentifier, /** * @summary `fingerprint`. * @public * @readonly */ fingerprint: BIT_STRING, /** * @summary Extensions that are not recognized. * @public * @readonly */ _unrecognizedExtensionsList?: _Element[]); /** * @summary Restructures an object into a FingerPrint * @description * * This takes an `object` and converts it to a `FingerPrint`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `FingerPrint`. * @returns {FingerPrint} */ static _from_object(_o: { [_K in keyof FingerPrint<any>]: FingerPrint<any>[_K]; }): FingerPrint<any>; } /** * @summary The Leading Root Component Types of FingerPrint * @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_FingerPrint: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of FingerPrint * @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_FingerPrint: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of FingerPrint * @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_FingerPrint: $.ComponentSpec[]; /** * @summary Returns a function that will decode an ASN.1 element into a(n) FingerPrint * @function * @param {_Element} el The element being decoded. * @returns A function that will decode an ASN.1 element. */ export declare function _get_decoder_for_FingerPrint<ToBeFingerprinted>(_decode_ToBeFingerprinted: $.ASN1Decoder<ToBeFingerprinted>): <ToBeFingerprinted_1>(el: _Element) => FingerPrint<ToBeFingerprinted_1>; /** * @summary Returns a function that will encode a(n) FingerPrint into an ASN.1 Element. * @function * @returns A function that will encode a(n) FingerPrint as an ASN.1 element. */ export declare function _get_encoder_for_FingerPrint<ToBeFingerprinted>(_encode_ToBeFingerprinted: $.ASN1Encoder<ToBeFingerprinted>): (value: FingerPrint<ToBeFingerprinted>, elGetter: $.ASN1Encoder<FingerPrint<ToBeFingerprinted>>) => _Element;