import * as pkcs11 from "pkcs11js"; import * as core from "./core"; export declare enum TokenFlag { RNG = 1, WRITE_PROTECTED = 2, LOGIN_REQUIRED = 4, USER_PIN_INITIALIZED = 8, RESTORE_KEY_NOT_NEEDED = 32, CLOCK_ON_TOKEN = 64, PROTECTED_AUTHENTICATION_PATH = 256, DUAL_CRYPTO_OPERATIONS = 512, TOKEN_INITIALIZED = 1024, SECONDARY_AUTHENTICATION = 2048, USER_PIN_COUNT_LOW = 65536, USER_PIN_FINAL_TRY = 131072, USER_PIN_LOCKED = 262144, USER_PIN_TO_BE_CHANGED = 524288, SO_PIN_COUNT_LOW = 1048576, SO_PIN_FINAL_TRY = 2097152, SO_PIN_LOCKED = 4194304, SO_PIN_TO_BE_CHANGED = 8388608, ERROR_STATE = 16777216 } /** * Represents PKCS#11 token structure */ export declare class Token extends core.HandleObject { /** * Application-defined label, assigned during token initialization */ label: string; /** * ID of the device manufacturer */ manufacturerID: string; /** * Model of the device */ model: string; /** * Character-string serial number of the device. */ serialNumber: string; /** * Bit flags indicating capabilities and status of the device */ flags: TokenFlag; /** * Maximum number of sessions that can be opened with the token at one time by a single application */ maxSessionCount: number; /** * Number of sessions that this application currently has open with the token */ sessionCount: number; /** * maximum number of read/write sessions that can be opened * with the token at one time by a single application */ maxRwSessionCount: number; /** * Number of read/write sessions that this application currently has open with the token */ rwSessionCount: number; /** * Maximum length in bytes of the PIN */ maxPinLen: number; /** * Minimum length in bytes of the PIN */ minPinLen: number; /** * The total amount of memory on the token in bytes in which public objects may be stored */ totalPublicMemory: number; /** * The amount of free (unused) memory on the token in bytes for public objects */ freePublicMemory: number; /** * The total amount of memory on the token in bytes in which private objects may be stored */ totalPrivateMemory: number; /** * The amount of free (unused) memory on the token in bytes for private objects */ freePrivateMemory: number; /** * Version number of hardware */ hardwareVersion: pkcs11.Version; /** * Version number of firmware */ firmwareVersion: pkcs11.Version; /** * Current time. Null when a token does not have a clock. */ utcTime: Date | null; constructor(handle: core.Handle, lib: pkcs11.PKCS11); protected getInfo(): void; }