first init
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generate a cryptographically secure random string for authorization keys.
|
||||
*/
|
||||
export declare function generateSecureKey(length?: number): string;
|
||||
/**
|
||||
* Hash a plain text key with SHA-256 for secure database storage.
|
||||
*/
|
||||
export declare function hashKey(key: string): string;
|
||||
/**
|
||||
* Constant-time hash verification to prevent timing attacks.
|
||||
*/
|
||||
export declare function verifyKeyHash(key: string, storedHash: string): boolean;
|
||||
Reference in New Issue
Block a user