diff options
author | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2020-03-25 12:19:35 +0100 |
---|---|---|
committer | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2020-03-26 18:33:21 +0100 |
commit | 70a96487b25557c3b1ffcba4b61cc1140e76935a (patch) | |
tree | 3846c7680a75047b81fe3b8307da47d4a4b0c080 /openpgp/src/crypto/aead.rs | |
parent | 89337646884b59c894329432eea960be4b3e335e (diff) |
Remove redundant field names.
Diffstat (limited to 'openpgp/src/crypto/aead.rs')
-rw-r--r-- | openpgp/src/crypto/aead.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/openpgp/src/crypto/aead.rs b/openpgp/src/crypto/aead.rs index 03d5c995..a79c7767 100644 --- a/openpgp/src/crypto/aead.rs +++ b/openpgp/src/crypto/aead.rs @@ -133,9 +133,9 @@ impl<'a> Decryptor<'a> { -> Result<Self> { Ok(Decryptor { - source: source, - sym_algo: sym_algo, - aead: aead, + source, + sym_algo, + aead, key: key.clone(), iv: Vec::from(iv).into_boxed_slice(), ad: [ @@ -148,7 +148,7 @@ impl<'a> Decryptor<'a> { 0, 0, 0, 0, 0, 0, 0, 0, ], digest_size: aead.digest_size()?, - chunk_size: chunk_size, + chunk_size, chunk_index: 0, bytes_decrypted: 0, buffer: Vec::with_capacity(chunk_size), @@ -551,8 +551,8 @@ impl<W: io::Write> Encryptor<W> { Ok(Encryptor { inner: Some(sink), - sym_algo: sym_algo, - aead: aead, + sym_algo, + aead, key: key.clone(), iv: Vec::from(iv).into_boxed_slice(), ad: [ @@ -565,11 +565,11 @@ impl<W: io::Write> Encryptor<W> { 0, 0, 0, 0, 0, 0, 0, 0, ], digest_size: aead.digest_size()?, - chunk_size: chunk_size, + chunk_size, chunk_index: 0, bytes_encrypted: 0, buffer: Vec::with_capacity(chunk_size), - scratch: scratch, + scratch, }) } |