@tradly/auth
Version:
Auth package for Tradly - handles authentication (email, phone, social login)
16 lines (15 loc) • 541 B
TypeScript
/**
* Encryption utility for PK keys
* Uses encoding with hash-based obfuscation for secure cookie storage
* The PK key is encoded using Base64 with domain-based salt and hash verification
*/
/**
* Encrypt PK key for storage
* Returns encoded string safe for cookie storage
*/
export declare function encryptPKKey(pkKey: string, domain: string): string;
/**
* Decrypt PK key from storage
* Returns original PK key or null if decryption fails
*/
export declare function decryptPKKey(encoded: string, domain: string): string | null;