From 68d2250afc3f3a74888c730407916431af739bfd Mon Sep 17 00:00:00 2001 From: Seth Golub Date: Sat, 4 Jul 2026 18:34:11 -0700 Subject: [PATCH] Fix randomBytes to use specified length Previously we were creating a 32-byte list no matter what was asked for. --- lib/utils/keys.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/keys.dart b/lib/utils/keys.dart index a89a5d6c..488223f7 100644 --- a/lib/utils/keys.dart +++ b/lib/utils/keys.dart @@ -6,7 +6,7 @@ import 'package:cryptography/cryptography.dart'; Uint8List randomBytes(int length) { final random = Random.secure(); - final bytes = Uint8List(32); + final bytes = Uint8List(length); for (int i = 0; i < length; i++) { bytes[i] = random.nextInt(256); }