From 63fa645cea6d2aeea725eefa6111de7f3130bd2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sun, 12 Feb 2023 12:45:05 +0100 Subject: [PATCH] fix(indexeddb): Fix implementation of SafeEncode for tuple of 5 elements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regression introduced by merging commit 9707d73 after efdeba7 Signed-off-by: Kévin Commaille --- .../matrix-sdk-indexeddb/src/safe_encode.rs | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/crates/matrix-sdk-indexeddb/src/safe_encode.rs b/crates/matrix-sdk-indexeddb/src/safe_encode.rs index 6ad1c60e440..d3dbbbc4cb6 100644 --- a/crates/matrix-sdk-indexeddb/src/safe_encode.rs +++ b/crates/matrix-sdk-indexeddb/src/safe_encode.rs @@ -230,30 +230,20 @@ where fn as_secure_string(&self, table_name: &str, store_cipher: &StoreCipher) -> String { [ - &base64_encode( - store_cipher.hash_key(table_name, self.0.as_encoded_string().as_bytes()), - &STANDARD_NO_PAD, - ), + &STANDARD_NO_PAD + .encode(store_cipher.hash_key(table_name, self.0.as_encoded_string().as_bytes())), KEY_SEPARATOR, - &base64_encode( - store_cipher.hash_key(table_name, self.1.as_encoded_string().as_bytes()), - &STANDARD_NO_PAD, - ), + &STANDARD_NO_PAD + .encode(store_cipher.hash_key(table_name, self.1.as_encoded_string().as_bytes())), KEY_SEPARATOR, - &base64_encode( - store_cipher.hash_key(table_name, self.2.as_encoded_string().as_bytes()), - &STANDARD_NO_PAD, - ), + &STANDARD_NO_PAD + .encode(store_cipher.hash_key(table_name, self.2.as_encoded_string().as_bytes())), KEY_SEPARATOR, - &base64_encode( - store_cipher.hash_key(table_name, self.3.as_encoded_string().as_bytes()), - &STANDARD_NO_PAD, - ), + &STANDARD_NO_PAD + .encode(store_cipher.hash_key(table_name, self.3.as_encoded_string().as_bytes())), KEY_SEPARATOR, - &base64_encode( - store_cipher.hash_key(table_name, self.4.as_encoded_string().as_bytes()), - &STANDARD_NO_PAD, - ), + &STANDARD_NO_PAD + .encode(store_cipher.hash_key(table_name, self.4.as_encoded_string().as_bytes())), ] .concat() }