File tree 4 files changed +9
-6
lines changed
4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change
1
+ ## 1.1.1
2
+ - Fix Salts not being able to be generated with lengths different than 16 bytes
3
+
1
4
## 1.1.0
2
5
- Fix repository & homepage links to point to newly structured repo
3
6
- Match versioning for dargon2_flutter's desktop support addition
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class Salt {
20
20
/// Optionally accepts a [length] of type int to create salts
21
21
/// of a length that the user inputs.
22
22
factory Salt .newSalt ({int length = 16 }) {
23
- return Salt (_getRandomBytes (16 ));
23
+ return Salt (_getRandomBytes (length ));
24
24
}
25
25
26
26
/// The method to get a List of random secure bytes with given length.
@@ -30,8 +30,8 @@ class Salt {
30
30
///
31
31
/// Returns a [List] of type int with random bytes.
32
32
static List <int > _getRandomBytes ([int length = 16 ]) {
33
- final _random = Random .secure ();
34
- return List <int >.generate (length, (i) => _random .nextInt (256 ));
33
+ final random = Random .secure ();
34
+ return List <int >.generate (length, (i) => random .nextInt (256 ));
35
35
}
36
36
37
37
/// A getter to get the bytes stored in the object.
Original file line number Diff line number Diff line change @@ -370,4 +370,4 @@ packages:
370
370
source: hosted
371
371
version: "3.1.1"
372
372
sdks:
373
- dart: ">=2.19.0 <3 .0.0"
373
+ dart: ">=2.19.0 <4 .0.0"
Original file line number Diff line number Diff line change 1
1
name : dargon2_interface
2
2
description : An interface for all dargon2 hashing functions. Provides the base outline for all implementations.
3
- version : 1.1.0
3
+ version : 1.1.1
4
4
homepage : https://github.com/tmthecoder/dargon2/blob/main/dargon2_interface
5
5
repository : https://github.com/tmthecoder/dargon2
6
6
7
7
environment :
8
- sdk : ' >=2.14.0 <3 .0.0'
8
+ sdk : ' >=2.14.0 <4 .0.0'
9
9
10
10
dependencies :
11
11
convert : ^3.0.1
You can’t perform that action at this time.
0 commit comments