Skip to content

Commit a384bb9

Browse files
committed
fix: add more precision to the KDF cache index
1 parent 6897586 commit a384bb9

File tree

1 file changed

+1
-1
lines changed
  • packages/profile-sync-controller/src/shared/encryption

1 file changed

+1
-1
lines changed

packages/profile-sync-controller/src/shared/encryption/encryption.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ class EncryptorDecryptor {
263263
salt?: Uint8Array,
264264
nativeScryptCrypto?: NativeScrypt,
265265
) {
266-
const hashedPassword = createSHA256Hash(password);
266+
const hashedPassword = `${createSHA256Hash(password)}.${o.N}.${o.r}.${o.p}.${o.dkLen}`;
267267
const cachedKey = salt
268268
? getCachedKeyBySalt(hashedPassword, salt)
269269
: getCachedKeyGeneratedWithSharedSalt(hashedPassword);

0 commit comments

Comments
 (0)