1
1
import 'package:uuid/rng.dart' ;
2
2
3
3
/// [GlobalOptions] stores the global options passed into the library on instantiation.
4
- /// [GlobalOptions.rng] is the random number generator class to use. Defaults to MathRNG () [MathRNG ]
4
+ /// [GlobalOptions.rng] is the random number generator class to use. Defaults to CryptoRNG () [CryptoRNG ]
5
5
class GlobalOptions {
6
6
final RNG ? rng;
7
7
@@ -32,7 +32,7 @@ class V1Options {
32
32
/// [V4Options] stores the options passed into the v4 function.
33
33
/// [random] is the random bytes to use to generate the UUID. Primarily used for
34
34
/// testing, or recreating a UUID
35
- /// [rng] is the random number generator function to use. Defaults to MathRNG () [MathRNG ]
35
+ /// [rng] is the random number generator function to use. Defaults to CryptoRNG () [CryptoRNG ]
36
36
class V4Options {
37
37
final List <int >? random;
38
38
final RNG ? rng;
@@ -116,7 +116,7 @@ class V1State {
116
116
static int ? clockSeq = 0 ;
117
117
static int mSecs = 0 ;
118
118
static int nSecs = 0 ;
119
- static RNG random = MathRNG ();
119
+ static RNG random = CryptoRNG ();
120
120
static bool initialized = false ;
121
121
}
122
122
@@ -126,7 +126,7 @@ class V1State {
126
126
/// initialized once already. Prevents re-initialization on subsequent calls to
127
127
/// _init() from within the v4 function.
128
128
class V4State {
129
- static RNG random = MathRNG ();
129
+ static RNG random = CryptoRNG ();
130
130
static bool initialized = true ;
131
131
}
132
132
@@ -143,7 +143,7 @@ class V6State {
143
143
static int ? clockSeq;
144
144
static int mSecs = 0 ;
145
145
static int nSecs = 0 ;
146
- static RNG random = MathRNG ();
146
+ static RNG random = CryptoRNG ();
147
147
static bool initialized = false ;
148
148
}
149
149
@@ -153,7 +153,7 @@ class V6State {
153
153
/// initialized once already. Prevents re-initialization on subsequent calls to
154
154
/// _init() from within the v4 function.
155
155
class V7State {
156
- static RNG random = MathRNG ();
156
+ static RNG random = CryptoRNG ();
157
157
static bool initialized = true ;
158
158
}
159
159
@@ -163,6 +163,6 @@ class V7State {
163
163
/// initialized once already. Prevents re-initialization on subsequent calls to
164
164
/// _init() from within the v4 function.
165
165
class V8State {
166
- static RNG random = MathRNG ();
166
+ static RNG random = CryptoRNG ();
167
167
static bool initialized = true ;
168
168
}
0 commit comments