Fix data decrypt error, and seldom nonce decode problem

This commit is contained in:
timvisee 2018-03-20 22:36:56 +01:00
parent 9eb9462c40
commit 4957c98f6d
No known key found for this signature in database
GPG key ID: 109CBA0BF74036C2
3 changed files with 3 additions and 3 deletions

View file

@ -502,7 +502,7 @@ impl Write for EncryptedFileWriter {
}
// Compute how many bytes were written
Ok(file_bytes - file_buf.len() + min(tag_buf.len(), tag_bytes))
Ok(file_buf.len() + tag_buf.len())
}
fn flush(&mut self) -> Result<(), io::Error> {