mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
upgrade blowfish so we can retire the old cipher API
the pin was holding back another package
This commit is contained in:
parent
1487bbe924
commit
a68d0513e3
2 changed files with 4 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ aes-kw = { version = "0.2.1", features = ["alloc"] }
|
||||||
|
|
||||||
# bcrypt
|
# bcrypt
|
||||||
cipher = "0.4.3"
|
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
|
# password modals - keep them in this crate to minimize plaintext password manipulations
|
||||||
gam = { path = "../gam" }
|
gam = { path = "../gam" }
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,9 @@ pub fn bcrypt(cost: u32, salt: &[u8], pw: &str, output: &mut [u8]) {
|
||||||
for i in 0..3 {
|
for i in 0..3 {
|
||||||
let i: usize = i * 2;
|
let i: usize = i * 2;
|
||||||
for _ in 0..64 {
|
for _ in 0..64 {
|
||||||
let (l, r) = state.bc_encrypt(ctext[i], ctext[i + 1]);
|
let lr = state.bc_encrypt([ctext[i], ctext[i + 1]]);
|
||||||
ctext[i] = l;
|
ctext[i] = lr[0];
|
||||||
ctext[i + 1] = r;
|
ctext[i + 1] = lr[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
let buf = ctext[i].to_be_bytes();
|
let buf = ctext[i].to_be_bytes();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue