Skip to content

Commit

Permalink
♻️ Eliminate unreachable code block
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanTsune committed Sep 28, 2023
1 parent f70e126 commit 5a13268
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/src/archive/entry/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ fn hash<'s, 'p: 's>(
(HashAlgorithm::Argon2Id, Encryption::Camellia) => {
hash::argon2_with_salt(password, Camellia256::key_size(), salt)
}
(HashAlgorithm::Pbkdf2Sha256, _) => hash::pbkdf2_with_salt(password, salt),
(_, _) => {
(HashAlgorithm::Pbkdf2Sha256, Encryption::Aes | Encryption::Camellia) => {
hash::pbkdf2_with_salt(password, salt)
}
(_, Encryption::No) => {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
String::from("Invalid combination"),
"Invalid combination",
))
}
}?;
Expand Down

0 comments on commit 5a13268

Please sign in to comment.