generateSecret function

List<int> generateSecret()

Implementation

List<int> generateSecret() {
  final secret = Uint8List(57);

  final secureRandom = Random.secure();

  for (int i = 0; i < 57; i++) {
    final b = secureRandom.nextInt(256);
    assert(b >= 0 && b < 256);
    secret[i] = b;
  }

  return UnmodifiableUint8ListView(secret);
}