mirror of
https://github.com/Nezumi-2711/next-gdrive-index.git
synced 2026-09-23 04:10:03 +00:00
Add function to comparing stored password and actual password
This commit is contained in:
@@ -8,9 +8,14 @@ function verify(text: string, hash: string): boolean {
|
||||
return encode(text) === hash;
|
||||
}
|
||||
|
||||
function compare(hash1: string, hash2: string): boolean {
|
||||
return hash1 === hash2;
|
||||
}
|
||||
|
||||
const passwordHash = {
|
||||
encode,
|
||||
verify,
|
||||
compare,
|
||||
};
|
||||
|
||||
export default passwordHash;
|
||||
|
||||
Reference in New Issue
Block a user