Fixed multiple clippy warnings.

This commit is contained in:
Revertron
2021-12-25 18:40:36 +01:00
parent d776cca5b3
commit 797584c516
29 changed files with 313 additions and 360 deletions
+2 -2
View File
@@ -23,12 +23,12 @@ impl Chacha {
}
pub fn encrypt(&self, data: &[u8]) -> Result<Vec<u8>, Error> {
let nonce = Nonce::from(self.nonce.clone());
let nonce = Nonce::from(self.nonce);
self.cipher.encrypt(&nonce, data.as_ref())
}
pub fn decrypt(&self, data: &[u8]) -> Result<Vec<u8>, Error> {
let nonce = Nonce::from(self.nonce.clone());
let nonce = Nonce::from(self.nonce);
self.cipher.decrypt(&nonce, data.as_ref())
}
+1 -1
View File
@@ -46,7 +46,7 @@ impl CryptoBox {
pub fn decrypt(secret: &[u8], message: &[u8]) -> Result<Vec<u8>, Error> {
let secret = SecretKey::from_bytes(secret).unwrap();
decrypt(&secret, &message)
decrypt(&secret, message)
}
}