generateNonce method
Implementation
Nonce generateNonce() {
while (true) {
var nonce = Nonce.generate();
var key = nonce.key;
// Newly generated nonce must have a unique key
if (_nonces.any((n) => n.key == key)) continue;
if (_nonces.length >= 8) _nonces.removeLast();
_nonces.add(nonce);
return nonce;
}
}