mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-09 00:33:09 +00:00
add encrypt_data implementation for AccountPublicMask
This commit is contained in:
parent
c1fd270ecf
commit
df2c2c84d3
@ -34,6 +34,17 @@ pub struct AccountPublicMask {
|
||||
pub balance: u64,
|
||||
}
|
||||
|
||||
impl AccountPublicMask {
|
||||
pub fn encrypt_data(
|
||||
ephemeral_key_holder: &EphemeralKeyHolder,
|
||||
viewing_public_key_receiver: AffinePoint,
|
||||
data: &[u8],
|
||||
) -> (CipherText, Nonce) {
|
||||
ephemeral_key_holder.encrypt_data(viewing_public_key_receiver, data)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl Account {
|
||||
pub fn new() -> Self {
|
||||
let key_holder = AddressKeyHolder::new_os_random();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user