fix(indexeddb): Fix implementation of SafeEncode for tuple of 5 elements

Regression introduced by merging commit 9707d73 after efdeba7

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille
2023-02-12 12:45:05 +01:00
committed by Jonas Platte
parent 0d4fac5962
commit 63fa645cea
+10 -20
View File
@@ -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()
}