UNPKG

@wildboar/pkcs

Version:
164 lines (163 loc) 5.34 kB
import { ASN1Element as _Element, INTEGER, OPTIONAL } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { HashAlgorithm } from "../PKCS-1/HashAlgorithm.ta"; import { MaskGenAlgorithm } from "../PKCS-1/MaskGenAlgorithm.ta"; import { TrailerField } from "../PKCS-1/TrailerField.ta"; export { HashAlgorithm, _decode_HashAlgorithm, _encode_HashAlgorithm, } from "../PKCS-1/HashAlgorithm.ta"; export { MaskGenAlgorithm, _decode_MaskGenAlgorithm, _encode_MaskGenAlgorithm, } from "../PKCS-1/MaskGenAlgorithm.ta"; export { mgf1SHA1 } from "../PKCS-1/mgf1SHA1.va"; export { sha1 } from "../PKCS-1/sha1.va"; export { TrailerField, trailerFieldBC, TrailerField_trailerFieldBC, _decode_TrailerField, _encode_TrailerField, } from "../PKCS-1/TrailerField.ta"; /** * @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 * } * ``` * * @class */ 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(): import("../PKCS-1/HashAlgorithm.ta").AlgorithmIdentifier; /** * @summary Getter that returns the default value for `maskGenAlgorithm`. * @public * @static * @method */ static get _default_value_for_maskGenAlgorithm(): import("../PKCS-1/HashAlgorithm.ta").AlgorithmIdentifier; /** * @summary Getter that returns the default value for `saltLength`. * @public * @static * @method */ static get _default_value_for_saltLength(): number; /** * @summary Getter that returns the default value for `trailerField`. * @public * @static * @method */ static get _default_value_for_trailerField(): INTEGER; } /** * @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} el The element being decoded. * @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;