Skip to content

Commit d54ed54

Browse files
committed
Add missing types
1 parent cdc2c24 commit d54ed54

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/argon2id.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,14 @@ namespace Argon2id {
164164
* @param {number} [l=32] - The desired length of the resulting hash in bytes.
165165
* @returns {Promise<string>} A promise that resolves to the encoded hash string.
166166
*/
167-
export const hashEncoded = (message: string, salt = Argon2id.randomSalt(), p = 4, m = 16, t = 3, l = 32): Promise<string> =>
167+
export const hashEncoded = (
168+
message: string,
169+
salt: string = Argon2id.randomSalt(),
170+
p: number = 4,
171+
m: number = 16,
172+
t: number = 3,
173+
l: number = 32
174+
): Promise<string> =>
168175
new Promise((res, rej) => {
169176
if (m <= 20) m = Math.pow(2, m);
170177
hash(message, salt, p, m, t, l)

0 commit comments

Comments
 (0)