diff --git a/CHANGELOG.md b/CHANGELOG.md index 0930d27..7893589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project follows [semantic versioning](http://semver.org). - [changed] Using serde instead of rustc_serialize - [changed] Updated dependencies +- [fixed] Fixed wrong address ### v0.8.1 (2017-05-09) diff --git a/src/crypto.rs b/src/crypto.rs index 42c7cd9..6ff9d26 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -244,7 +244,7 @@ impl Crypto { } } - pub fn decrypt(&self, mut buf: &mut [u8], nonce: &[u8], header: &[u8]) -> Result { + pub fn decrypt(&self, buf: &mut [u8], nonce: &[u8], header: &[u8]) -> Result { match *self { Crypto::None => Ok(buf.len()), Crypto::ChaCha20Poly1305{ref key, ..} => { @@ -286,7 +286,7 @@ impl Crypto { } } - pub fn encrypt(&mut self, mut buf: &mut [u8], mlen: usize, nonce_bytes: &mut [u8], header: &[u8]) -> usize { + pub fn encrypt(&mut self, buf: &mut [u8], mlen: usize, nonce_bytes: &mut [u8], header: &[u8]) -> usize { match *self { Crypto::None => mlen, Crypto::ChaCha20Poly1305{ref key, ref mut nonce} => {