File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 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+
14## 1.1.0
25- Fix repository & homepage links to point to newly structured repo
36- 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 {
2020 /// Optionally accepts a [length] of type int to create salts
2121 /// of a length that the user inputs.
2222 factory Salt .newSalt ({int length = 16 }) {
23- return Salt (_getRandomBytes (16 ));
23+ return Salt (_getRandomBytes (length ));
2424 }
2525
2626 /// The method to get a List of random secure bytes with given length.
@@ -30,8 +30,8 @@ class Salt {
3030 ///
3131 /// Returns a [List] of type int with random bytes.
3232 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 ));
3535 }
3636
3737 /// 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:
370370 source: hosted
371371 version: "3.1.1"
372372sdks:
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 11name : dargon2_interface
22description : An interface for all dargon2 hashing functions. Provides the base outline for all implementations.
3- version : 1.1.0
3+ version : 1.1.1
44homepage : https://github.com/tmthecoder/dargon2/blob/main/dargon2_interface
55repository : https://github.com/tmthecoder/dargon2
66
77environment :
8- sdk : ' >=2.14.0 <3 .0.0'
8+ sdk : ' >=2.14.0 <4 .0.0'
99
1010dependencies :
1111 convert : ^3.0.1
You can’t perform that action at this time.
0 commit comments