From bdb8f0aac91c108f59f79e9a97b47623d87c0d4b Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 20 Mar 2025 13:49:11 -0500 Subject: [PATCH] fix --- web/repertory/lib/helpers.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/repertory/lib/helpers.dart b/web/repertory/lib/helpers.dart index dd4b71be..382a9154 100644 --- a/web/repertory/lib/helpers.dart +++ b/web/repertory/lib/helpers.dart @@ -256,13 +256,15 @@ String encryptValue(String value, String password) { } final keyHash = sodium.crypto.genericHash( - outLen: sodium.crypto.aeadChaCha20Poly1305.keyBytes, + outLen: sodium.crypto.aeadXChaCha20Poly1305IETF.keyBytes, message: Uint8List.fromList(password.toCharArray()), ); + debugPrint("key: ${base64Encode(keyHash)}"); final crypto = sodium.crypto.aeadXChaCha20Poly1305IETF; final nonce = sodium.secureRandom(crypto.nonceBytes).extractBytes(); + debugPrint("nonce: ${base64Encode(nonce)}"); final data = crypto.encrypt( additionalData: Uint8List.fromList('repertory'.toCharArray()), key: SecureKey.fromList(sodium, keyHash),