Overview
The nonce package provides a simple static generator for creating random alphanumeric strings, useful for generating unique identifiers in security-sensitive contexts. It can be used either as a static utility or instantiated as an object holding a generated nonce. Designed with testing, cryptography, and permission systems in mind, it ensures unpredictability and uniqueness. The package is cross-platform, supporting Android, iOS, Web, macOS, Windows, and Linux, making it suitable for diverse application environments.
Use cases
- Generating unique tokens for authentication
- Creating test data with guaranteed uniqueness
- Supporting cryptographic operations requiring nonces
- Preventing replay attacks in network requests
- Securing session management
Key features
- Static generator for random alphanumeric strings
- Object-based nonce instantiation
- Cross-platform compatibility
- Simple API for quick integration
- Designed for security and testing use cases
Suitable for
- Developers working on secure applications
- Test engineers needing unique identifiers
- Projects involving authentication or encryption
- Applications requiring anti-replay protection
- Flutter apps targeting multiple platforms
Considerations
- Not intended for high-entropy cryptographic key generation
- Ensure proper seeding if deterministic behavior is needed
- Verify usage context aligns with security requirements
- Avoid reuse of generated nonces in sensitive scenarios
- Depends on Dart's random number generator, which may not be cryptographically strong in all environments