SecureNonce class final

Generates cryptographically secure random nonces.

Uses Random.secure internally.

Constructors

SecureNonce({Random? random})
Creates a nonce generator.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

generate(int length) → String
Returns a hex string from length random bytes.
generateAlphanumeric(int length) → String
Returns an alphanumeric string of exactly length characters.
generateBase64(int length) → String
Returns base64-encoded string from length random bytes.
generateBase64Url(int length) → String
Returns URL-safe base64 from length random bytes.
generateBytes(int length) → Uint8List
Returns length random bytes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited