added missed type conversion in hash function
This commit is contained in:
parent
78f4cca807
commit
bbf73f1858
1 changed files with 2 additions and 2 deletions
|
@ -129,10 +129,10 @@ export async function verifyHash(hash: string, input: string) {
|
|||
return sodium.crypto_pwhash_str_verify(hash, await fromB64(input));
|
||||
}
|
||||
|
||||
export async function hash(input: string | Uint8Array) {
|
||||
export async function hash(input: string) {
|
||||
await sodium.ready;
|
||||
return sodium.crypto_pwhash_str(
|
||||
input,
|
||||
await fromB64(input),
|
||||
sodium.crypto_pwhash_OPSLIMIT_SENSITIVE,
|
||||
sodium.crypto_pwhash_MEMLIMIT_MODERATE,
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue