import * as pkcs11 from "pkcs11js"; import * as core from "./core"; import { Slot, SlotCollection } from "./slot"; /** * Represents the PKCS#11 module */ export declare class Module extends core.BaseObject { /** * Loads PKCS#11 library * @param libFile The path to PKCS#11 library * @param libName The name of PKCS#11 library * @returns The new instance of {@link Module} */ static load(libFile: string, libName?: string): Module; /** * Path to PKCS#11 library */ libFile: string; /** * Name of PKCS#11 module */ libName: string; /** * Cryptoki interface version */ cryptokiVersion: pkcs11.Version; /** * blank padded manufacturer ID */ manufacturerID: string; /** * Bit flags reserved for future versions. Must be zero for this version */ flags: number; /** * Library description */ libraryDescription: string; /** * Cryptoki library version number */ libraryVersion: pkcs11.Version; /** * Initialize a new instance of {@link Module} * @param lib PKCS#11 module */ constructor(lib: pkcs11.PKCS11); /** * Initializes the Cryptoki library * @param options Initialization options * * @remarks The method doesn't throw CKR_CRYPTOKI_ALREADY_INITIALIZED error if library already initialized. */ initialize(options?: pkcs11.InitializationOptions): void; /** * Indicates that an application is done with the Cryptoki library */ finalize(): void; /** * obtains a list of slots in the system * @param {number} index index of an element in collection * @param {number} tokenPresent only slots with tokens. Default `True` */ getSlots(index: number, tokenPresent?: boolean): Slot; /** * @param {number} tokenPresent only slots with tokens. Default `True` */ getSlots(tokenPresent?: boolean): SlotCollection; /** * Closes PKCS#11 library */ close(): void; /** * Retrieves information about module and fills object fields */ protected getInfo(): void; }