From 20ab37068d689002e5e156ac43c48485770c3ada Mon Sep 17 00:00:00 2001 From: Pascal Perrenoud Date: Tue, 10 Sep 2024 00:33:00 +0200 Subject: [PATCH] Fix huge ugly typo in IV sizes... --- src/secret-box.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/secret-box.ts b/src/secret-box.ts index 065482a..4922c61 100644 --- a/src/secret-box.ts +++ b/src/secret-box.ts @@ -24,7 +24,7 @@ export default class SecretBox { public static async encrypt(data: Uint8Array, key: CryptoKey): Promise { log.trace('encrypt') - const iv = crypto.getRandomValues(new Uint8Array(11)) + const iv = crypto.getRandomValues(new Uint8Array(12)) const cipher = await crypto.subtle.encrypt( { name: consts.ENCRYPTION,