nonce
library
Constants
-
NONCE_LENGTH
→ const int
-
The exact length, in characters, of a base64url-encoded zkLogin nonce.
Functions
-
generateNonce(PublicKey publicKey, int maxEpoch, dynamic randomness)
→ String
-
Generates the zkLogin nonce that commits to the ephemeral
publicKey, the
maxEpoch until which it is valid, and a randomness value.
-
generateRandomness()
→ String
-
Generates a cryptographically secure 128-bit randomness value, returned as
a decimal string suitable for use as the JWT randomness in a zkLogin flow.
-
randomBytes(int size)
→ Uint8List
-
Returns
size cryptographically secure random bytes.
-
toBigIntBE(Uint8List bytes)
→ BigInt
-
Interprets
bytes as a big-endian unsigned integer.