mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-02 13:23:10 +00:00
bug fix
This commit is contained in:
parent
5a76f51fe5
commit
5dba3856bf
@ -62,13 +62,14 @@ impl AddressKeyHolder {
|
||||
nonce: Nonce,
|
||||
) -> Vec<u8> {
|
||||
let key_point = self.calculate_shared_secret_receiver(ephemeral_public_key_sender);
|
||||
let key_raw = key_point.to_bytes();
|
||||
let key_raw_adjust: [u8; 32] = key_raw.as_slice().try_into().unwrap();
|
||||
|
||||
let binding = key_point.to_bytes();
|
||||
let key_raw = &binding.as_slice()[..32];
|
||||
let key_raw_adjust: [u8; 32] = key_raw.try_into().unwrap();
|
||||
|
||||
let key: Key<Aes256Gcm> = key_raw_adjust.into();
|
||||
|
||||
|
||||
let cipher = Aes256Gcm::new(&key);
|
||||
|
||||
|
||||
cipher.decrypt(&nonce, ciphertext.as_slice()).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user