Fix bug in MgmKey::decrypt

This commit is contained in:
Jack Grigg
2019-12-02 02:23:16 +00:00
parent 370a90f800
commit ada3454d26
+1 -1
View File
@@ -268,7 +268,7 @@ impl MgmKey {
pub(crate) fn decrypt(&self, input: &[u8; DES_LEN_DES]) -> [u8; DES_LEN_DES] { pub(crate) fn decrypt(&self, input: &[u8; DES_LEN_DES]) -> [u8; DES_LEN_DES] {
let mut output = input.to_owned(); let mut output = input.to_owned();
TdesEde3::new(GenericArray::from_slice(&self.0)) TdesEde3::new(GenericArray::from_slice(&self.0))
.encrypt_block(GenericArray::from_mut_slice(&mut output)); .decrypt_block(GenericArray::from_mut_slice(&mut output));
output output
} }
} }