@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
103 lines (102 loc) • 3.2 kB
TypeScript
import { ASN1Element as _Element, BIT_STRING } from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import { AlgorithmIdentifier } from "@wildboar/x500/src/lib/modules/AuthenticationFramework/AlgorithmIdentifier.ta";
/**
* @summary OriginatorPublicKey
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* OriginatorPublicKey ::= SEQUENCE {
* algorithm AlgorithmIdentifier,
* publicKey BIT STRING
* }
* ```
*
* @class
*/
export declare class OriginatorPublicKey {
/**
* @summary `algorithm`.
* @public
* @readonly
*/
readonly algorithm: AlgorithmIdentifier;
/**
* @summary `publicKey`.
* @public
* @readonly
*/
readonly publicKey: BIT_STRING;
constructor(
/**
* @summary `algorithm`.
* @public
* @readonly
*/
algorithm: AlgorithmIdentifier,
/**
* @summary `publicKey`.
* @public
* @readonly
*/
publicKey: BIT_STRING);
/**
* @summary Restructures an object into a OriginatorPublicKey
* @description
*
* This takes an `object` and converts it to a `OriginatorPublicKey`.
*
* @public
* @static
* @method
* @param {Object} _o An object having all of the keys and values of a `OriginatorPublicKey`.
* @returns {OriginatorPublicKey}
*/
static _from_object(_o: {
[_K in keyof OriginatorPublicKey]: OriginatorPublicKey[_K];
}): OriginatorPublicKey;
}
/**
* @summary The Leading Root Component Types of OriginatorPublicKey
* @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_OriginatorPublicKey: $.ComponentSpec[];
/**
* @summary The Trailing Root Component Types of OriginatorPublicKey
* @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_OriginatorPublicKey: $.ComponentSpec[];
/**
* @summary The Extension Addition Component Types of OriginatorPublicKey
* @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_OriginatorPublicKey: $.ComponentSpec[];
/**
* @summary Decodes an ASN.1 element into a(n) OriginatorPublicKey
* @function
* @param {_Element} el The element being decoded.
* @returns {OriginatorPublicKey} The decoded data structure.
*/
export declare function _decode_OriginatorPublicKey(el: _Element): OriginatorPublicKey;
/**
* @summary Encodes a(n) OriginatorPublicKey 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 OriginatorPublicKey, encoded as an ASN.1 Element.
*/
export declare function _encode_OriginatorPublicKey(value: OriginatorPublicKey, elGetter: $.ASN1Encoder<OriginatorPublicKey>): _Element;