@@ -57,7 +57,7 @@ class DArgon2 {
57
57
/// Returns a [Future] containing a [DArgon2Result] with the hashed password,
58
58
/// encoded hash, and various conversion options for the hash and encoded bytes.
59
59
Future <DArgon2Result > hashPasswordString (String password,
60
- {@ required Salt salt,
60
+ {required Salt salt,
61
61
int iterations = 32 ,
62
62
int memory = 256 ,
63
63
int parallelism = 2 ,
@@ -85,7 +85,7 @@ class DArgon2 {
85
85
/// Returns a [Future] containing a [DArgon2Result] with the hashed password,
86
86
/// encoded hash, and various conversion options for the hash and encoded bytes.
87
87
Future <DArgon2Result > hashPasswordBytes (List <int > password,
88
- {@ required Salt salt,
88
+ {required Salt salt,
89
89
int iterations = 32 ,
90
90
int memory = 256 ,
91
91
int parallelism = 2 ,
@@ -114,7 +114,7 @@ class DArgon2 {
114
114
/// Returns a [DArgon2Result] with the hashed password, encoded hash, and various
115
115
/// conversion options for the hash and encoded bytes.
116
116
DArgon2Result hashPasswordStringSync (String password,
117
- {@ required Salt salt,
117
+ {required Salt salt,
118
118
int iterations = 32 ,
119
119
int memory = 256 ,
120
120
int parallelism = 2 ,
@@ -142,14 +142,13 @@ class DArgon2 {
142
142
/// Returns a [DArgon2Result] with the hashed password, encoded hash, and various
143
143
/// conversion options for the hash and encoded bytes.
144
144
DArgon2Result hashPasswordBytesSync (List <int > password,
145
- {@ required Salt salt,
145
+ {required Salt salt,
146
146
int iterations = 32 ,
147
147
int memory = 256 ,
148
148
int parallelism = 2 ,
149
149
int length = 32 ,
150
150
Argon2Type type = Argon2Type .i,
151
151
Argon2Version version = Argon2Version .V13 }) {
152
- assert (salt != null );
153
152
//Create pointers to pass to the C method
154
153
var passPointer = _setPtr (password);
155
154
var saltPointer = _setPtr (salt.bytes);
@@ -265,7 +264,7 @@ class DArgon2 {
265
264
/// Returns a [Pointer] of type [Uint8] to be used for Argon2 computations.
266
265
Pointer <Uint8 > _setPtr (Iterable <int > iterable) {
267
266
//Allocate a pointer in memory and set the values from the given list
268
- var p = malloc <Uint8 >(Uint8List .fromList (iterable).length);
267
+ var p = malloc <Uint8 >(Uint8List .fromList (iterable. toList () ).length);
269
268
p.asTypedList (iterable.length).setAll (0 , iterable);
270
269
return p;
271
270
}
0 commit comments