diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-11-25 19:22:53 +0100 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-11-25 20:22:41 +0100 |
commit | fd3ca918b2e8b4fe3b9ecdec56fadaa0e1972e58 (patch) | |
tree | 15fddd664a88603a82c45c1c11732c5134b12e4d /openpgp | |
parent | 9962ca7f6c6006a50a032572e4e16259e03a56ec (diff) |
openpgp: Remove unnecessary references.
Diffstat (limited to 'openpgp')
-rw-r--r-- | openpgp/src/crypto/backend/rust/asymmetric.rs | 4 | ||||
-rw-r--r-- | openpgp/src/crypto/backend/rust/ecdh.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/crypto/backend/rust/asymmetric.rs b/openpgp/src/crypto/backend/rust/asymmetric.rs index 405b932b..cd3faee7 100644 --- a/openpgp/src/crypto/backend/rust/asymmetric.rs +++ b/openpgp/src/crypto/backend/rust/asymmetric.rs @@ -393,7 +393,7 @@ impl<R> Key4<SecretParts, R> // https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-07#section-13.2. let mut public = [0u8; 1 + CURVE25519_SIZE]; public[0] = 0x40; - &mut public[1..].copy_from_slice(Into::<PublicKey>::into(&private).as_bytes()); + public[1..].copy_from_slice(Into::<PublicKey>::into(&private).as_bytes()); Self::with_secret( ctime.into().unwrap_or_else(crate::now), @@ -500,7 +500,7 @@ impl<R> Key4<SecretParts, R> // https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-07#section-13.2. let mut compressed_public = [0u8; 1 + CURVE25519_SIZE]; compressed_public[0] = 0x40; - &mut compressed_public[1..].copy_from_slice(public.as_bytes()); + compressed_public[1..].copy_from_slice(public.as_bytes()); ( PublicKeyAlgorithm::EdDSA, diff --git a/openpgp/src/crypto/backend/rust/ecdh.rs b/openpgp/src/crypto/backend/rust/ecdh.rs index 757bd90b..ac306ff7 100644 --- a/openpgp/src/crypto/backend/rust/ecdh.rs +++ b/openpgp/src/crypto/backend/rust/ecdh.rs @@ -43,7 +43,7 @@ pub fn encrypt<R>(recipient: &Key<key::PublicParts, R>, // octet in front of the key. let mut VB = [0; 1 + CURVE25519_SIZE]; VB[0] = 0x40; - &mut VB[1..].copy_from_slice(public.as_bytes()); + VB[1..].copy_from_slice(public.as_bytes()); let VB = MPI::new(&VB); // Encode the shared secret. |