@wildboar/ocsp
Version:
Online Certificate Status Protocol PDUs in TypeScript
116 lines • 3.39 kB
text/typescript
import { ASN1Element as _Element, BIT_STRING, OPTIONAL } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { AlgorithmIdentifier } from "@wildboar/pki-stub";
import { Certificate } from "@wildboar/pki-stub";
/**
* @summary Signature
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* Signature ::= SEQUENCE {
* signatureAlgorithm AlgorithmIdentifier
* { SIGNATURE-ALGORITHM, {...}},
* signature BIT STRING,
* certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
* ```
*
*/
export declare class Signature {
/**
* @summary `signatureAlgorithm`.
* @public
* @readonly
*/
readonly signatureAlgorithm: AlgorithmIdentifier;
/**
* @summary `signature`.
* @public
* @readonly
*/
readonly signature: BIT_STRING;
/**
* @summary `certs`.
* @public
* @readonly
*/
readonly certs?: OPTIONAL<Certificate[]>;
constructor(
/**
* @summary `signatureAlgorithm`.
* @public
* @readonly
*/
signatureAlgorithm: AlgorithmIdentifier,
/**
* @summary `signature`.
* @public
* @readonly
*/
signature: BIT_STRING,
/**
* @summary `certs`.
* @public
* @readonly
*/
certs?: OPTIONAL<Certificate[]>);
/**
* @summary Restructures an object into a Signature
* @description
*
* This takes an `object` and converts it to a `Signature`.
*
* @public
* @static
* @method
* @param {Object} _o An object having all of the keys and values of a `Signature`.
* @returns {Signature}
*/
static _from_object(_o: {
[_K in keyof Signature]: Signature[_K];
}): Signature;
}
/**
* @summary The Leading Root Component Types of Signature
* @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_Signature: $.ComponentSpec[];
/**
* @summary The Trailing Root Component Types of Signature
* @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_Signature: $.ComponentSpec[];
/**
* @summary The Extension Addition Component Types of Signature
* @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_Signature: $.ComponentSpec[];
/**
* @summary Decodes an ASN.1 element into a(n) Signature
* @function
* @param {_Element} el The element being decoded.
* @returns {Signature} The decoded data structure.
*/
export declare function _decode_Signature(el: _Element): Signature;
/**
* @summary Encodes a(n) Signature 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 Signature, encoded as an ASN.1 Element.
*/
export declare function _encode_Signature(value: Signature, elGetter: $.ASN1Encoder<Signature>): _Element;
//# sourceMappingURL=Signature.ta.d.mts.map