upgrade blowfish so we can retire the old cipher API

the pin was holding back another package
This commit is contained in:
bunnie 2024-02-08 13:59:26 +08:00
parent 1487bbe924
commit a68d0513e3
2 changed files with 4 additions and 4 deletions

View file

@ -33,7 +33,7 @@ aes-kw = { version = "0.2.1", features = ["alloc"] }
# bcrypt
cipher = "0.4.3"
blowfish = { version = "0.8.0", features = ["bcrypt"] }
blowfish = { version = "0.9.1", features = ["bcrypt"] }
# password modals - keep them in this crate to minimize plaintext password manipulations
gam = { path = "../gam" }

View file

@ -62,9 +62,9 @@ pub fn bcrypt(cost: u32, salt: &[u8], pw: &str, output: &mut [u8]) {
for i in 0..3 {
let i: usize = i * 2;
for _ in 0..64 {
let (l, r) = state.bc_encrypt(ctext[i], ctext[i + 1]);
ctext[i] = l;
ctext[i + 1] = r;
let lr = state.bc_encrypt([ctext[i], ctext[i + 1]]);
ctext[i] = lr[0];
ctext[i + 1] = lr[1];
}
let buf = ctext[i].to_be_bytes();