@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
158 lines • 4.86 kB
text/typescript
import { ASN1Element as _Element, INTEGER, OPTIONAL } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { HashAlgorithm } from "../PKCS-1/HashAlgorithm.ta.mjs";
import { MaskGenAlgorithm } from "../PKCS-1/MaskGenAlgorithm.ta.mjs";
import { TrailerField } from "../PKCS-1/TrailerField.ta.mjs";
/**
* @summary RSASSA_PSS_params
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* RSASSA-PSS-params ::= SEQUENCE {
* hashAlgorithm [0] HashAlgorithm DEFAULT sha1,
* maskGenAlgorithm [1] MaskGenAlgorithm DEFAULT mgf1SHA1,
* saltLength [2] INTEGER DEFAULT 20,
* trailerField [3] TrailerField DEFAULT trailerFieldBC
* }
* ```
*
*/
export declare class RSASSA_PSS_params {
/**
* @summary `hashAlgorithm`.
* @public
* @readonly
*/
readonly hashAlgorithm?: OPTIONAL<HashAlgorithm>;
/**
* @summary `maskGenAlgorithm`.
* @public
* @readonly
*/
readonly maskGenAlgorithm?: OPTIONAL<MaskGenAlgorithm>;
/**
* @summary `saltLength`.
* @public
* @readonly
*/
readonly saltLength?: OPTIONAL<INTEGER>;
/**
* @summary `trailerField`.
* @public
* @readonly
*/
readonly trailerField?: OPTIONAL<TrailerField>;
constructor(
/**
* @summary `hashAlgorithm`.
* @public
* @readonly
*/
hashAlgorithm?: OPTIONAL<HashAlgorithm>,
/**
* @summary `maskGenAlgorithm`.
* @public
* @readonly
*/
maskGenAlgorithm?: OPTIONAL<MaskGenAlgorithm>,
/**
* @summary `saltLength`.
* @public
* @readonly
*/
saltLength?: OPTIONAL<INTEGER>,
/**
* @summary `trailerField`.
* @public
* @readonly
*/
trailerField?: OPTIONAL<TrailerField>);
/**
* @summary Restructures an object into a RSASSA_PSS_params
* @description
*
* This takes an `object` and converts it to a `RSASSA_PSS_params`.
*
* @public
* @static
* @method
* @param {Object} _o An object having all of the keys and values of a `RSASSA_PSS_params`.
* @returns {RSASSA_PSS_params}
*/
static _from_object(_o: {
[_K in keyof RSASSA_PSS_params]: RSASSA_PSS_params[_K];
}): RSASSA_PSS_params;
/**
* @summary Getter that returns the default value for `hashAlgorithm`.
* @public
* @static
* @method
*/
static get _default_value_for_hashAlgorithm(): HashAlgorithm;
/**
* @summary Getter that returns the default value for `maskGenAlgorithm`.
* @public
* @static
* @method
*/
static get _default_value_for_maskGenAlgorithm(): MaskGenAlgorithm;
/**
* @summary Getter that returns the default value for `saltLength`.
* @public
* @static
* @method
*/
static get _default_value_for_saltLength(): INTEGER;
/**
* @summary Getter that returns the default value for `trailerField`.
* @public
* @static
* @method
*/
static get _default_value_for_trailerField(): TrailerField;
}
/**
* @summary The Leading Root Component Types of RSASSA_PSS_params
* @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_RSASSA_PSS_params: $.ComponentSpec[];
/**
* @summary The Trailing Root Component Types of RSASSA_PSS_params
* @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_RSASSA_PSS_params: $.ComponentSpec[];
/**
* @summary The Extension Addition Component Types of RSASSA_PSS_params
* @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_RSASSA_PSS_params: $.ComponentSpec[];
/**
* @summary Decodes an ASN.1 element into a(n) RSASSA_PSS_params
* @function
* @param {_Element} el The element being decoded.
* @returns {RSASSA_PSS_params} The decoded data structure.
*/
export declare function _decode_RSASSA_PSS_params(el: _Element): RSASSA_PSS_params;
/**
* @summary Encodes a(n) RSASSA_PSS_params 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 RSASSA_PSS_params, encoded as an ASN.1 Element.
*/
export declare function _encode_RSASSA_PSS_params(value: RSASSA_PSS_params, elGetter: $.ASN1Encoder<RSASSA_PSS_params>): _Element;
//# sourceMappingURL=RSASSA-PSS-params.ta.d.mts.map