generateRandomNonce static method
Generate a random nonce
Implementation
static Uint8List generateRandomNonce(int length, {int bit = 256}) {
final random = Random.secure();
final nonce = List<int>.generate(length, (_) => random.nextInt(bit));
return Uint8List.fromList(nonce);
}