From f474d504141f0f143b9d1f531ceaf014d231b483 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Tue, 17 Jun 2025 16:46:07 +0200 Subject: [PATCH] [bug] Fix update_process --- src/api.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/api.rs b/src/api.rs index bf7cc7b..06713bc 100644 --- a/src/api.rs +++ b/src/api.rs @@ -1279,9 +1279,8 @@ pub fn update_process( for (field, plain_value) in new_attributes.iter() { let hash = new_state.pcd_commitment.get(field).ok_or(anyhow::Error::msg("Missing commitment"))?; let key = generate_key(&mut rng); + let cipher = encrypt_with_key(&key, plain_value.as_slice())?; new_state.keys.insert(field.to_owned(), key); - let serialized = serde_json::to_string(plain_value)?; - let cipher = encrypt_with_key(&key, serialized.as_bytes())?; encrypted_data.insert(hash.to_lower_hex_string(), cipher.to_lower_hex_string()); }