Skip to content

Commit

Permalink
Merge pull request #2 from sylvainpelissier/build
Browse files Browse the repository at this point in the history
Correct build
  • Loading branch information
oberien authored Dec 8, 2023
2 parents 9209eb2 + 111ae8b commit 1c9810d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ path = "./src/lib.rs"
[dependencies]
aes = "0.8"
base64 = { version = "0.13", default-features = false, features = ["alloc"] }
bincode = { version = "2.0.0-rc.1", default-features = false, features = ["alloc", "derive"] }
bincode = { version = "2.0.0-rc.3", default-features = false, features = ["alloc", "derive"] }
crossterm = { version = "0.19", optional = true }
hmac = "0.12.1"
pbkdf2 = { version = "0.11.0", default_features = false }
Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl LuksHeader {
///
/// Note: a LUKS2 header is always exactly 4096 bytes long.
pub fn from_slice(slice: &[u8]) -> Result<Self, ParseError> {
let options = bincode::config::legacy().with_big_endian().with_fixed_int_encoding().skip_fixed_array_length();
let options = bincode::config::legacy().with_big_endian().with_fixed_int_encoding();
let h: Self = bincode::decode_from_slice(slice, options)?.0;
// let h: BorrowCompat<Self> = bincode::decode_from_slice(slice, options)?.0;
// let h = h.0;
Expand Down Expand Up @@ -951,10 +951,8 @@ impl<T: Read + Seek> LuksDevice<T> {
}
x => return Err(LuksError::UnsupportedKeySize(x)),
}

// make k a secret after decryption
let k = Secret::new(k);

// merge and hash master key
let master_key = Secret::new(MasterKey(af::merge(
&k.expose_secret(),
Expand Down

0 comments on commit 1c9810d

Please sign in to comment.