keyvenant
Version:
Keyvenant is a JavaScript tool to generate and export CovenantSQL keys to facilitate key management locally and in web extensions.
17 lines (16 loc) • 635 B
TypeScript
/**
* derive secret key from password user typed-in
* use sha256x2 as key derivation function(kdf)
* @param password user's password in utf8
* @param salt default salt in hex
* @return secretKey string in hex (16 bytes because of sha256)
*/
export declare function derive(password: string, salt: string): string;
/**
* verify secret key from password and salt
* @param password old password in utf8
* @param salt default salt in hex
* @param secretKey secret key in hex
* @return boolean of verify success or not
*/
export declare function verify(password: string, salt: string, secretKey: string): Boolean;