File tree Expand file tree Collapse file tree 7 files changed +20
-10
lines changed
analytics/amplify_analytics_pinpoint_dart
auth/amplify_auth_cognito_dart
authenticator/amplify_authenticator/example Expand file tree Collapse file tree 7 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ dependencies:
20
20
meta : ^1.7.0
21
21
retry : ^3.1.0
22
22
stack_trace : ^1.10.0
23
- uuid : " >=3.0.6 <=3 .0.7 "
23
+ uuid : " >=3.0.6 <5 .0.0 "
24
24
25
25
dev_dependencies :
26
26
amplify_lints : " >=3.0.1 <3.1.0"
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ dependencies:
23
23
path : ^1.8.0
24
24
smithy : " >=0.6.1 <0.7.0"
25
25
smithy_aws : " >=0.6.0 <0.7.0"
26
- uuid : " >=3.0.6 <=3 .0.7 "
26
+ uuid : " >=3.0.6 <5 .0.0 "
27
27
28
28
dev_dependencies :
29
29
amplify_lints : " >=3.0.0 <3.1.0"
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ dependencies:
33
33
smithy : " >=0.6.0 <0.7.0"
34
34
smithy_aws : " >=0.6.0 <0.7.0"
35
35
stream_transform : ^2.0.0
36
- uuid : " >=3.0.6 <=3 .0.7 "
36
+ uuid : " >=3.0.6 <5 .0.0 "
37
37
win32 : " >=4.1.2 <6.0.0"
38
38
win32_registry : ^1.1.0
39
39
worker_bee : " >=0.2.0+5 <0.3.0"
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ dev_dependencies:
55
55
integration_test :
56
56
sdk : flutter
57
57
stream_transform : ^2.0.0
58
- uuid : " >=3.0.6 <=3 .0.7 "
58
+ uuid : " >=3.0.6 <5 .0.0 "
59
59
60
60
flutter :
61
61
uses-material-design : true
Original file line number Diff line number Diff line change 1
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
+ import 'dart:math' ;
5
+ import 'dart:typed_data' ;
6
+
4
7
import 'package:uuid/uuid.dart' ;
5
- import 'package:uuid/uuid_util.dart' ;
6
8
7
9
/// Generates a UUID (v4).
8
10
///
9
11
/// If [secure] is `true` , uses a crypto-secure RNG at the cost of worse
10
12
/// performance (5-100x, depending on the platform).
11
13
String uuid ({bool secure = false }) => const Uuid ().v4 (
14
+ // ignore: deprecated_member_use
12
15
options: ! secure
13
16
? null
14
- // Use the crypto-secure RNG per `package:uuid` docs:
15
- // https://github.com/Daegalus/dart-uuid/blob/d7bc930942afc752edd0fd15f8bf8234d81dfeda/example/example.dart#L21
16
17
: const < String , Object > {
17
- 'rng' : UuidUtil .cryptoRNG,
18
+ 'rng' : _cryptoRNG,
19
+ 'positionalArgs' : [],
20
+ 'namedArgs' : < Symbol , dynamic > {},
18
21
},
19
22
);
23
+
24
+ /// Creates 16 digit cryptographically secure random number.
25
+ Uint8List _cryptoRNG () {
26
+ return Uint8List .fromList (
27
+ List <int >.generate (16 , (i) => Random .secure ().nextInt (256 )),
28
+ );
29
+ }
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ dependencies:
22
22
os_detect : ^2.0.0
23
23
path : ^1.8.0
24
24
stream_transform : ^2.0.0
25
- uuid : " >=3.0.6 <=3 .0.7 "
25
+ uuid : " >=3.0.6 <5 .0.0 "
26
26
27
27
dev_dependencies :
28
28
amplify_lints : " >=3.0.0 <3.1.0"
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ dependencies:
42
42
sqlite3 : ^2.0.0
43
43
source_gen : ^1.3.2
44
44
stack_trace : ^1.10.0
45
- uuid : " >=3.0.6 <=3 .0.7 "
45
+ uuid : " >=3.0.6 <5 .0.0 "
46
46
win32 : " >=4.1.2 <6.0.0"
47
47
xml : 6.3.0
48
48
test : ^1.22.1
You can’t perform that action at this time.
0 commit comments