SecureTokenGenerator class
Secure token generator implementation
This class provides secure token generation using cryptographically secure random number generation. It implements various token formats and validation methods.
- Implemented types
Constructors
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
-
generateAlphanumericToken(
{int length = 32}) → String - Generates an alphanumeric token
-
generateNumericToken(
{int length = 6}) → String - Generates a numeric token
-
generateRefreshToken(
{int length = 64}) → String -
Generates a refresh token
override
-
generateToken(
{int length = 64, String? prefix}) → String -
Generates a secure token
override
-
generateUuidToken(
) → String - Generates a UUID-like token
-
isValidTokenFormat(
String token) → bool -
Validates token format
override
-
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