Remove r_hlen_block since it is not used
@@ -87,6 +87,7 @@ impl Pbkdf2 {
// First iteration
// u_step here will be equal to U_1 in RFC
u_step = self.return_prf(&self.password, &salt_extended);
+ salt_extended.clear();
// Push directly into the final buffer, as this is the first iteration
f_iter_final.extend_from_slice(&u_step);
@@ -122,8 +123,6 @@ impl Pbkdf2 {
// Corresponds to l in RFC
let hlen_blocks = (self.length as f32 / (self.hmac.return_value() / 8) as f32).ceil() as usize;
- // Corresponds to r in RFC
- let r_last_block: usize = self.length - ((hlen_blocks - 1) * (self.hmac.return_value() / 8));
let mut pbkdf2_res: Vec<u8> = Vec::new();
let mut iter_count: u32 = 0;
