From a82310dbc4f58ac956ee4cae430a1e1810ca747f Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 10 Mar 2025 18:28:03 +0000 Subject: [PATCH] Update src/crypto_wrapper.rs --- src/crypto_wrapper.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto_wrapper.rs b/src/crypto_wrapper.rs index 7be9767..c65d4d6 100644 --- a/src/crypto_wrapper.rs +++ b/src/crypto_wrapper.rs @@ -26,7 +26,7 @@ impl CryptoWrapper { } /// Encrypt some data, returning the result as a base64-encoded string - pub fn encrypt>(&self, data: &T) -> Result> { + pub fn encrypt>(&self, data: &T) -> Result> { let aes_key = Aes256Gcm::new(&self.key); let nonce_bytes = rand::rng().random::<[u8; NONCE_LEN]>(); @@ -41,7 +41,7 @@ impl CryptoWrapper { } /// Decrypt some data previously encrypted using the [`CryptoWrapper::encrypt`] method - pub fn decrypt>(&self, input: &str) -> Result> { + pub fn decrypt>(&self, input: &str) -> Result> { let bytes = BASE64_STANDARD.decode(input)?; if bytes.len() < NONCE_LEN {