@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
222 lines • 5.86 kB
text/typescript
import { ASN1Element as _Element, GeneralizedTime, INTEGER, OCTET_STRING, OPTIONAL } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { Path } from "../PKCS-15/Path.ta.mjs";
import { PinFlags } from "../PKCS-15/PinFlags.ta.mjs";
import { PinType, _enum_for_PinType } from "../PKCS-15/PinType.ta.mjs";
import { Reference } from "../PKCS-15/Reference.ta.mjs";
/**
* @summary PinAttributes
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* PinAttributes ::= SEQUENCE {
* pinFlags PinFlags,
* pinType PinType,
* minLength INTEGER (pkcs15-lb-minPinLength..pkcs15-ub-minPinLength),
* storedLength INTEGER (0..pkcs15-ub-storedPinLength),
* maxLength INTEGER OPTIONAL,
* pinReference [0] Reference DEFAULT 0,
* padChar OCTET STRING (SIZE(1)) OPTIONAL,
* lastPinChange GeneralizedTime OPTIONAL,
* path Path OPTIONAL,
* ... -- For future extensions
* }
* ```
*
*/
export declare class PinAttributes {
/**
* @summary `pinFlags`.
* @public
* @readonly
*/
readonly pinFlags: PinFlags;
/**
* @summary `pinType`.
* @public
* @readonly
*/
readonly pinType: PinType;
/**
* @summary `minLength`.
* @public
* @readonly
*/
readonly minLength: INTEGER;
/**
* @summary `storedLength`.
* @public
* @readonly
*/
readonly storedLength: INTEGER;
/**
* @summary `maxLength`.
* @public
* @readonly
*/
readonly maxLength?: OPTIONAL<INTEGER>;
/**
* @summary `pinReference`.
* @public
* @readonly
*/
readonly pinReference?: OPTIONAL<Reference>;
/**
* @summary `padChar`.
* @public
* @readonly
*/
readonly padChar?: OPTIONAL<OCTET_STRING>;
/**
* @summary `lastPinChange`.
* @public
* @readonly
*/
readonly lastPinChange?: OPTIONAL<GeneralizedTime>;
/**
* @summary `path`.
* @public
* @readonly
*/
readonly path?: OPTIONAL<Path>;
/**
* @summary Extensions that are not recognized.
* @public
* @readonly
*/
readonly _unrecognizedExtensionsList: _Element[];
constructor(
/**
* @summary `pinFlags`.
* @public
* @readonly
*/
pinFlags: PinFlags,
/**
* @summary `pinType`.
* @public
* @readonly
*/
pinType: PinType,
/**
* @summary `minLength`.
* @public
* @readonly
*/
minLength: INTEGER,
/**
* @summary `storedLength`.
* @public
* @readonly
*/
storedLength: INTEGER,
/**
* @summary `maxLength`.
* @public
* @readonly
*/
maxLength?: OPTIONAL<INTEGER>,
/**
* @summary `pinReference`.
* @public
* @readonly
*/
pinReference?: OPTIONAL<Reference>,
/**
* @summary `padChar`.
* @public
* @readonly
*/
padChar?: OPTIONAL<OCTET_STRING>,
/**
* @summary `lastPinChange`.
* @public
* @readonly
*/
lastPinChange?: OPTIONAL<GeneralizedTime>,
/**
* @summary `path`.
* @public
* @readonly
*/
path?: OPTIONAL<Path>,
/**
* @summary Extensions that are not recognized.
* @public
* @readonly
*/
_unrecognizedExtensionsList?: _Element[]);
/**
* @summary Restructures an object into a PinAttributes
* @description
*
* This takes an `object` and converts it to a `PinAttributes`.
*
* @public
* @static
* @method
* @param {Object} _o An object having all of the keys and values of a `PinAttributes`.
* @returns {PinAttributes}
*/
static _from_object(_o: {
[_K in keyof PinAttributes]: PinAttributes[_K];
}): PinAttributes;
/**
* @summary Getter that returns the default value for `pinReference`.
* @public
* @static
* @method
*/
static get _default_value_for_pinReference(): Reference;
/**
* @summary The enum used as the type of the component `pinType`
* @public
* @static
*/
static _enum_for_pinType: typeof _enum_for_PinType;
}
/**
* @summary The Leading Root Component Types of PinAttributes
* @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_PinAttributes: $.ComponentSpec[];
/**
* @summary The Trailing Root Component Types of PinAttributes
* @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_PinAttributes: $.ComponentSpec[];
/**
* @summary The Extension Addition Component Types of PinAttributes
* @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_PinAttributes: $.ComponentSpec[];
/**
* @summary Decodes an ASN.1 element into a(n) PinAttributes
* @function
* @param {_Element} el The element being decoded.
* @returns {PinAttributes} The decoded data structure.
*/
export declare function _decode_PinAttributes(el: _Element): PinAttributes;
/**
* @summary Encodes a(n) PinAttributes 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 PinAttributes, encoded as an ASN.1 Element.
*/
export declare function _encode_PinAttributes(value: PinAttributes, elGetter: $.ASN1Encoder<PinAttributes>): _Element;
//# sourceMappingURL=PinAttributes.ta.d.mts.map