mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 09:26:37 +00:00
Update srp.ts
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import argon2, { argon2id } from "argon2";
|
import argon2 from "argon2";
|
||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
import jsrp from "jsrp";
|
import jsrp from "jsrp";
|
||||||
import nacl from "tweetnacl";
|
import nacl from "tweetnacl";
|
||||||
@@ -58,7 +58,7 @@ export const generateUserSrpKeys = async (email: string, password: string) => {
|
|||||||
timeCost: 3,
|
timeCost: 3,
|
||||||
parallelism: 1,
|
parallelism: 1,
|
||||||
hashLength: 32,
|
hashLength: 32,
|
||||||
type: argon2id,
|
type: 2,
|
||||||
raw: true
|
raw: true
|
||||||
});
|
});
|
||||||
if (!derivedKey) throw new Error("Failed to derive key from password");
|
if (!derivedKey) throw new Error("Failed to derive key from password");
|
||||||
@@ -102,7 +102,7 @@ export const getUserPrivateKey = async (password: string, user: TUserEncryptionK
|
|||||||
timeCost: 3,
|
timeCost: 3,
|
||||||
parallelism: 1,
|
parallelism: 1,
|
||||||
hashLength: 32,
|
hashLength: 32,
|
||||||
type: argon2id,
|
type: 2,
|
||||||
raw: true
|
raw: true
|
||||||
});
|
});
|
||||||
if (!derivedKey) throw new Error("Failed to derive key from password");
|
if (!derivedKey) throw new Error("Failed to derive key from password");
|
||||||
|
|||||||
Reference in New Issue
Block a user