SecureRandom class abstract
A synchronous secure random number generator (RNG).
Being synchronous, this RNG cannot return direct results from sources of randomness like '/dev/random' or similar. For that, use an EntropySource which allows to be called asynchronously. Usually an EntropySource should be seen like a random generation device while a SecureRandom should be seen like a cryptographic PRNG. Thus, data from an EntropySource should be seen as 'more random' than that returned from a SecureRandom.
- Inheritance
- Implementers
Constructors
- SecureRandom([String algorithmName = ''])
-
Create the secure random specified by the standard
algorithmName
.factory
Properties
- algorithmName → String
-
Get this algorithm's standard name.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
nextBigInteger(
int bitLength) → BigInt -
Get a random BigInteger of
bitLength
bits. -
nextBytes(
int count) → Uint8List - Get a list of bytes of arbitrary length.
-
nextUint16(
) → int - Get two bytes long random int.
-
nextUint32(
) → int - Get four bytes long random int.
-
nextUint8(
) → int - Get one byte long random int.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
seed(
CipherParameters params) → void - Seed the RNG with some entropy (look at package cipher_entropy providing entropy sources).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited