diff options
Diffstat (limited to 'packages/taler-util/src/argon2-impl.node.ts')
-rw-r--r-- | packages/taler-util/src/argon2-impl.node.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/taler-util/src/argon2-impl.node.ts b/packages/taler-util/src/argon2-impl.node.ts new file mode 100644 index 000000000..d1a36c4fe --- /dev/null +++ b/packages/taler-util/src/argon2-impl.node.ts @@ -0,0 +1,19 @@ +import { argon2id } from "hash-wasm"; + +export async function HashArgon2idImpl( + password: Uint8Array, + salt: Uint8Array, + iterations: number, + memorySize: number, + hashLength: number, +): Promise<Uint8Array> { + return await argon2id({ + password: password, + salt: salt, + iterations: iterations, + memorySize: memorySize, + hashLength: hashLength, + parallelism: 1, + outputType: "binary", + }); +} |