newRatchetNonce function

  1. @Deprecated('Sessions are rooted in an ephemeral X25519 agreement since 1.1.0; ' 'use RatchetEphemeral.generate. Removed in 2.0.0.')
List<int> newRatchetNonce()

A cryptographically random 16-byte value.

Implementation

@Deprecated(
  'Sessions are rooted in an ephemeral X25519 agreement since 1.1.0; '
  'use RatchetEphemeral.generate. Removed in 2.0.0.',
)
List<int> newRatchetNonce() {
  final rng = Random.secure();
  return List<int>.generate(16, (_) => rng.nextInt(256));
}