Fixed wrong address

pull/29/head
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] Updated dependencies
- [fixed] Fixed wrong address
### 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 {
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} => {