generateNonce function
Generate a cryptographically secure random nonce
Implementation
String generateNonce({int length = 32}) {
final random = Random.secure();
return Iterable.generate(
length,
(_) => _chars[random.nextInt(_chars.length)],
).join();
}