emotionctl
Version:
A secure terminal-based journaling system designed as a safe space for developers going through heartbreak, breakups, or betrayal
33 lines • 1.03 kB
TypeScript
import { EncryptedData } from '../types';
export declare class CryptoService {
private static readonly ALGORITHM;
private static readonly KEY_SIZE;
private static readonly IV_SIZE;
private static readonly SALT_SIZE;
private static readonly ITERATIONS;
/**
* Generates a cryptographic key from password using PBKDF2
*/
private static deriveKey;
/**
* Encrypts data using AES-256-CBC
*/
static encrypt(data: string, password: string): EncryptedData;
/**
* Decrypts data using AES-256-CBC
*/
static decrypt(encryptedData: EncryptedData, password: string): string;
/**
* Generates a secure hash of a password for verification
*/
static hashPassword(password: string): string;
/**
* Verifies a password against its hash
*/
static verifyPassword(password: string, hash: string): boolean;
/**
* Generates a random ID for journal entries
*/
static generateId(): string;
}
//# sourceMappingURL=CryptoService.d.ts.map