import { Storage } from "../storage"; /** * Enumeration specifies key types */ export declare enum KeyType { RSA, DSA, DH, ECDSA, EC, X9_42_DH, KEA, GENERIC_SECRET, RC2, RC4, DES, DES2, DES3, CAST, CAST3, CAST5, CAST128, RC5, IDEA, SKIPJACK, BATON, JUNIPER, CDMF, AES, GOSTR3410, GOSTR3411, GOST28147, BLOWFISH, TWOFISH, SECURID, HOTP, ACTI, CAMELLIA, ARIA } /** * Enumeration specifies key generation mechanisms */ export declare enum KeyGenMechanism { AES, RSA, RSA_X9_31, DSA, DH_PKCS, DH_X9_42, GOSTR3410, GOST28147, RC2, RC4, DES, DES2, SECURID, ACTI, CAST, CAST3, CAST5, CAST128, RC5, IDEA, GENERIC_SECRET, SSL3_PRE_MASTER, CAMELLIA, ARIA, SKIPJACK, KEA, BATON, ECDSA, EC, JUNIPER, TWOFISH } /** * Definition for the base key object class * - defines the object class `CKO_PUBLIC_KEY`, `CKO_PRIVATE_KEY` and `CKO_SECRET_KEY` for type `CK_OBJECT_CLASS` * as used in the `CKA_CLASS` attribute of objects */ export declare class Key extends Storage { /** * Type of key * - Must be specified when object is created with `C_CreateObject` * - Must be specified when object is unwrapped with `C_UnwrapKey` */ type: KeyType; /** * Key identifier for key (default empty) * - May be modified after object is created with a `C_SetAttributeValue` call, * or in the process of copying object with a `C_CopyObject` call. * However, it is possible that a particular token may not permit modification * of the attribute during the course of a `C_CopyObject` call. */ id: Buffer; /** * Start date for the key (default empty) * - May be modified after object is created with a `C_SetAttributeValue` call, * or in the process of copying object with a `C_CopyObject` call. * However, it is possible that a particular token may not permit modification * of the attribute during the course of a `C_CopyObject` call. */ startDate: Date; /** * End date for the key (default empty) * - May be modified after object is created with a `C_SetAttributeValue` call, * or in the process of copying object with a `C_CopyObject` call. * However, it is possible that a particular token may not permit modification * of the attribute during the course of a `C_CopyObject` call. */ endDate: Date; /** * `CK_TRUE` if key supports key derivation * (i.e., if other keys can be derived from this one (default `CK_FALSE`) * - May be modified after object is created with a `C_SetAttributeValue` call, * or in the process of copying object with a `C_CopyObject` call. * However, it is possible that a particular token may not permit modification * of the attribute during the course of a `C_CopyObject` call. * @returns boolean */ derive: boolean; /** * `CK_TRUE` only if key was either * generated locally (i.e., on the token) * with a `C_GenerateKey` or `C_GenerateKeyPair` call * created with a `C_CopyObject` call * as a copy of a key which had its `CKA_LOCAL` attribute set to `CK_TRUE` * - Must not be specified when object is created with `C_CreateObject`. * - Must not be specified when object is generated with `C_GenerateKey` or `C_GenerateKeyPair`. * - Must not be specified when object is unwrapped with `C_UnwrapKey`. */ local: boolean; /** * Identifier of the mechanism used to generate the key material. * - Must not be specified when object is created with `C_CreateObject`. * - Must not be specified when object is generated with `C_GenerateKey` or `C_GenerateKeyPair`. * - Must not be specified when object is unwrapped with `C_UnwrapKey`. */ mechanism: KeyGenMechanism; get allowedMechanisms(): void; set allowedMechanisms(v: void); }