UNPKG

@wildboar/pkcs

Version:
140 lines 4.01 kB
import { ASN1Element as _Element, INTEGER, OPTIONAL } from "@wildboar/asn1"; import * as $ from "@wildboar/asn1/functional"; import { AlgorithmIdentifier } from "../PKCS5v2-1/AlgorithmIdentifier.ta.mjs"; import { PBKDF2_params_salt } from "../PKCS5v2-1/PBKDF2-params-salt.ta.mjs"; /** * @summary PBKDF2_params * @description * * ### ASN.1 Definition: * * ```asn1 * PBKDF2-params ::= SEQUENCE { * salt CHOICE { * specified OCTET STRING, * otherSource AlgorithmIdentifier {{PBKDF2-SaltSources}} * }, * iterationCount INTEGER (1..MAX), * keyLength INTEGER (1..MAX) OPTIONAL, * prf AlgorithmIdentifier {{PBKDF2-PRFs}} DEFAULT * algid-hmacWithSHA1 * } * ``` * */ export declare class PBKDF2_params { /** * @summary `salt`. * @public * @readonly */ readonly salt: PBKDF2_params_salt; /** * @summary `iterationCount`. * @public * @readonly */ readonly iterationCount: INTEGER; /** * @summary `keyLength`. * @public * @readonly */ readonly keyLength?: OPTIONAL<INTEGER>; /** * @summary `prf`. * @public * @readonly */ readonly prf?: OPTIONAL<AlgorithmIdentifier>; constructor( /** * @summary `salt`. * @public * @readonly */ salt: PBKDF2_params_salt, /** * @summary `iterationCount`. * @public * @readonly */ iterationCount: INTEGER, /** * @summary `keyLength`. * @public * @readonly */ keyLength?: OPTIONAL<INTEGER>, /** * @summary `prf`. * @public * @readonly */ prf?: OPTIONAL<AlgorithmIdentifier>); /** * @summary Restructures an object into a PBKDF2_params * @description * * This takes an `object` and converts it to a `PBKDF2_params`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `PBKDF2_params`. * @returns {PBKDF2_params} */ static _from_object(_o: { [_K in keyof PBKDF2_params]: PBKDF2_params[_K]; }): PBKDF2_params; /** * @summary Getter that returns the default value for `prf`. * @public * @static * @method */ static get _default_value_for_prf(): AlgorithmIdentifier; } /** * @summary The Leading Root Component Types of PBKDF2_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_PBKDF2_params: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of PBKDF2_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_PBKDF2_params: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of PBKDF2_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_PBKDF2_params: $.ComponentSpec[]; /** * @summary Decodes an ASN.1 element into a(n) PBKDF2_params * @function * @param {_Element} el The element being decoded. * @returns {PBKDF2_params} The decoded data structure. */ export declare function _decode_PBKDF2_params(el: _Element): PBKDF2_params; /** * @summary Encodes a(n) PBKDF2_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 PBKDF2_params, encoded as an ASN.1 Element. */ export declare function _encode_PBKDF2_params(value: PBKDF2_params, elGetter: $.ASN1Encoder<PBKDF2_params>): _Element; //# sourceMappingURL=PBKDF2-params.ta.d.mts.map