[bug] Fix update_process
This commit is contained in:
parent
70665fa762
commit
f474d50414
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user