/**
 * Crypto Types
 * @countermeasure/web-components
 *
 * Shared TypeScript interfaces for encryption operations.
 * Designed for compatibility with FluxEncrypt (Rust).
 */
export type EncodingFormat = 'base64' | 'hex' | 'raw';
export interface SymmetricCipherConfig {
    /** Output encoding format. Default: 'base64' */
    encoding?: EncodingFormat;
}
export interface EncryptedData {
    /** The encrypted ciphertext */
    ciphertext: string | Uint8Array;
    /** Initialization vector (nonce) - 12 bytes for GCM */
    iv: string | Uint8Array;
    /** Authentication tag - 16 bytes for GCM */
    tag?: string | Uint8Array;
}
export interface SymmetricCipher {
    /** Encrypt plaintext data */
    encrypt(plaintext: string | Uint8Array): Promise<string>;
    /** Decrypt ciphertext data */
    decrypt(ciphertext: string): Promise<string>;
    /** Get the current encoding format */
    getEncoding(): EncodingFormat;
}
export interface HybridCipherConfig {
    /** RSA key size in bits. Default: 4096 */
    rsaKeySize?: 2048 | 4096;
    /** Output encoding format. Default: 'base64' */
    encoding?: EncodingFormat;
}
export interface KeyPair {
    publicKey: CryptoKey;
    privateKey: CryptoKey;
}
export interface ExportedKeyPair {
    publicKey: string;
    privateKey: string;
}
export interface HybridCipher {
    /** Encrypt data using hybrid encryption */
    encrypt(publicKey: CryptoKey, plaintext: string | Uint8Array): Promise<string>;
    /** Decrypt data using hybrid encryption */
    decrypt(privateKey: CryptoKey, ciphertext: string): Promise<Uint8Array>;
}
export interface KeyDerivationConfig {
    /** Number of PBKDF2 iterations. Default: 100000 */
    iterations?: number;
    /** Salt length in bytes. Default: 16 */
    saltLength?: number;
    /** Hash algorithm. Default: 'SHA-256' */
    hash?: 'SHA-256' | 'SHA-384' | 'SHA-512';
}
export interface DerivedKeyResult {
    key: CryptoKey;
    salt: Uint8Array;
}
export interface CryptoManagerConfig {
    /** Output encoding format. Default: 'base64' */
    encoding?: EncodingFormat;
    /** RSA key size for hybrid encryption. Default: 4096 */
    rsaKeySize?: 2048 | 4096;
    /** PBKDF2 iterations for key derivation. Default: 100000 */
    pbkdf2Iterations?: number;
}
export interface CryptoManager {
    encryptSecret(key: string, plaintext: string): Promise<string>;
    decryptSecret(key: string, ciphertext: string): Promise<string>;
    generateSymmetricKey(): Promise<string>;
    generateKeyPair(): Promise<KeyPair>;
    encrypt(publicKey: CryptoKey, data: string | Uint8Array): Promise<string>;
    decrypt(privateKey: CryptoKey, ciphertext: string): Promise<Uint8Array>;
    exportPublicKey(key: CryptoKey): Promise<string>;
    exportPrivateKey(key: CryptoKey): Promise<string>;
    importPublicKey(pem: string): Promise<CryptoKey>;
    importPrivateKey(pem: string): Promise<CryptoKey>;
    deriveKeyFromPassword(password: string, salt?: Uint8Array): Promise<DerivedKeyResult>;
}
export declare class CryptoError extends Error {
    readonly code: CryptoErrorCode;
    readonly cause?: unknown | undefined;
    constructor(message: string, code: CryptoErrorCode, cause?: unknown | undefined);
}
export type CryptoErrorCode = 'INVALID_KEY' | 'INVALID_KEY_LENGTH' | 'INVALID_CIPHERTEXT' | 'DECRYPTION_FAILED' | 'ENCRYPTION_FAILED' | 'KEY_GENERATION_FAILED' | 'KEY_DERIVATION_FAILED' | 'KEY_EXPORT_FAILED' | 'KEY_IMPORT_FAILED' | 'UNSUPPORTED_ALGORITHM' | 'ENCODING_ERROR';
//# sourceMappingURL=types.d.ts.map