Fixed wrong address

This commit is contained in:
Dennis Schwerdel 2019-01-01 22:55:15 +01:00
parent 4c9ec65254
commit 6866c29a71
2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ This project follows [semantic versioning](http://semver.org).
- [changed] Using serde instead of rustc_serialize - [changed] Using serde instead of rustc_serialize
- [changed] Updated dependencies - [changed] Updated dependencies
- [fixed] Fixed wrong address
### v0.8.1 (2017-05-09) ### v0.8.1 (2017-05-09)

View File

@ -244,7 +244,7 @@ impl Crypto {
} }
} }
pub fn decrypt(&self, mut buf: &mut [u8], nonce: &[u8], header: &[u8]) -> Result<usize, Error> { pub fn decrypt(&self, buf: &mut [u8], nonce: &[u8], header: &[u8]) -> Result<usize, Error> {
match *self { match *self {
Crypto::None => Ok(buf.len()), Crypto::None => Ok(buf.len()),
Crypto::ChaCha20Poly1305{ref key, ..} => { 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 { match *self {
Crypto::None => mlen, Crypto::None => mlen,
Crypto::ChaCha20Poly1305{ref key, ref mut nonce} => { Crypto::ChaCha20Poly1305{ref key, ref mut nonce} => {