This commit is contained in:
Jim Hamill
2025-02-02 06:21:25 +00:00
parent 2def0383ec
commit 2e4e6a2761
5 changed files with 94 additions and 156 deletions
+3 -1
View File
@@ -29,7 +29,9 @@ export class Encrypter {
algorithm: 'AES-GCM',
keyLength: 256,
salt: utf8ToBin(DEFAULT_XO_SALT),
ivLength: 16,
// NOTE: IV of length 96 bits (12 bytes) is recommended length as per https://csrc.nist.gov/pubs/sp/800/38/d/final.
// This is both secure - and avoids additional compute incurred by hashing.
ivLength: 12,
iterations: 100_000,
...opts,
};