Move the remainder of iterations if statement, into the one checking if iterations is greater than 1. This gave a slight performance improvement.
@@ -95,7 +95,6 @@ impl Pbkdf2 {
for c in 0..f_result.len() {
f_result[c] ^= u_step[c];
}
- }
// Remainder of iterations
if self.iterations > 2 {
for _x in 2..self.iterations {
@@ -106,6 +105,7 @@ impl Pbkdf2 {
}
}
}
+ }
f_result
}
