mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-03-26 20:23:45 +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,
|
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 {
|
impl Account {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
let key_holder = AddressKeyHolder::new_os_random();
|
let key_holder = AddressKeyHolder::new_os_random();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user