UNPKG

@lonewolfspace/storage-manager-ts

Version:

A universal browser storage manager with optional AES encryption support for localStorage, sessionStorage, and cookies.

22 lines (21 loc) 691 B
export declare class Encryption { private static readonly DEFAULT_IV; /** * Validate key length (16, 24, or 32 bytes) */ private static validateKey; /** * Encrypts a string using AES encryption * @param value The string to encrypt * @param secretKey The secret key for encryption * @returns Encrypted string */ static encrypt(value: string, secretKey: string): string; /** * Decrypts an encrypted string * @param encryptedValue The encrypted string * @param secretKey The secret key used for encryption * @returns Decrypted string */ static decrypt(encryptedValue: string, secretKey: string): string; }