Skip to content

Commit

Permalink
fix: make chachapoly valid ciphermode
Browse files Browse the repository at this point in the history
Add chachapoly as valid ciphermode for Authenticated Cipher.
  • Loading branch information
Taowyoo committed Oct 27, 2023
1 parent 188be9a commit 4135cd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mbedtls/src/cipher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub enum Authenticated {}
impl Type for Authenticated {
fn is_valid_mode(mode: raw::CipherMode) -> bool {
match mode {
raw::CipherMode::GCM | raw::CipherMode::CCM | raw::CipherMode::KW | raw::CipherMode::KWP => true,
raw::CipherMode::GCM | raw::CipherMode::CCM | raw::CipherMode::KW | raw::CipherMode::KWP | raw::CipherMode::CHACHAPOLY => true,
_ => false,
}
}
Expand Down

0 comments on commit 4135cd4

Please sign in to comment.