From 0f35db72de0cffff652e06336a8a968a1366cee2 Mon Sep 17 00:00:00 2001 From: samkim-crypto Date: Wed, 23 Oct 2024 22:43:47 +0900 Subject: [PATCH] [zk-sdk] Make `AeKey` be `Clone` and `AeCiphertext` be `Copy` (#3273) * make `AeKey` `Clone` * make `AeCiphertext` `Copy` --- zk-sdk/src/encryption/auth_encryption.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zk-sdk/src/encryption/auth_encryption.rs b/zk-sdk/src/encryption/auth_encryption.rs index 15ed58069b80ca..e28b3fcc053ea9 100644 --- a/zk-sdk/src/encryption/auth_encryption.rs +++ b/zk-sdk/src/encryption/auth_encryption.rs @@ -88,7 +88,7 @@ impl AuthenticatedEncryption { } } -#[derive(Debug, Zeroize, Eq, PartialEq)] +#[derive(Clone, Debug, Zeroize, Eq, PartialEq)] pub struct AeKey([u8; AE_KEY_LEN]); impl AeKey { /// Generates a random authenticated encryption key. @@ -243,7 +243,7 @@ type Nonce = [u8; NONCE_LEN]; type Ciphertext = [u8; CIPHERTEXT_LEN]; /// Authenticated encryption nonce and ciphertext -#[derive(Debug, Default, Clone)] +#[derive(Clone, Copy, Debug, Default)] pub struct AeCiphertext { nonce: Nonce, ciphertext: Ciphertext,