/** * Secure Cryptographic Plugin * Implements proper encryption, key derivation, and secure hashing */ import type { ICryptoPlugin, EncryptedData, PluginState } from '../core/interfaces'; export interface CryptoPluginConfig { algorithm: 'AES-GCM' | 'AES-CBC'; keyDerivation: 'PBKDF2' | 'Argon2'; iterations: number; keyLength: number; saltLength: number; ivLength: number; } export declare class CryptoPlugin implements ICryptoPlugin { readonly id = "crypto-plugin"; readonly name = "Secure Cryptographic Plugin"; readonly version = "2.0.0"; state: PluginState; private config; private masterKey; private keyCache; constructor(config?: Partial); initialize(config?: Partial): Promise; dispose(): Promise; isReady(): boolean; /** * Encrypt data with a specific key */ encrypt(data: Uint8Array, key: CryptoKey): Promise; /** * Decrypt data with a specific key */ decrypt(data: EncryptedData, key: CryptoKey): Promise; /** * Generate a new cryptographic key */ generateKey(): Promise; /** * Derive a key from a password and salt */ deriveKey(password: string, salt: Uint8Array): Promise; /** * Generate a secure hash of data */ hash(data: Uint8Array): Promise; /** * Encrypt biometric template with secure key derivation */ encryptTemplate(templateData: Uint8Array, systemSalt: string, userSalt?: string): Promise; /** * Decrypt biometric template */ decryptTemplate(encryptedData: EncryptedData, systemSalt: string): Promise; /** * Generate a secure humanity code */ generateHumanityCode(biometricId: string, systemSalt: string, additionalData?: string): Promise; /** * Generate a secure random salt */ generateRandomSalt(): Uint8Array; /** * Generate a secure random IV */ generateRandomIV(): Uint8Array; /** * Generate master key for internal operations */ private generateMasterKey; /** * Get plugin configuration */ getConfig(): Required; /** * Update plugin configuration */ updateConfig(newConfig: Partial): Promise; } //# sourceMappingURL=crypto-plugin.d.ts.map