[zk-token-sdk] Make `AeCiphertext` inner fields be private (#32188)
make `AeCiphertext` fields and types be private
This commit is contained in:
parent
1616123b84
commit
91ec92cd76
|
@ -192,14 +192,14 @@ impl SeedDerivable for AeKey {
|
||||||
|
|
||||||
/// For the purpose of encrypting balances for the spl token accounts, the nonce and ciphertext
|
/// For the purpose of encrypting balances for the spl token accounts, the nonce and ciphertext
|
||||||
/// sizes should always be fixed.
|
/// sizes should always be fixed.
|
||||||
pub type Nonce = [u8; 12];
|
type Nonce = [u8; 12];
|
||||||
pub type Ciphertext = [u8; 24];
|
type Ciphertext = [u8; 24];
|
||||||
|
|
||||||
/// Authenticated encryption nonce and ciphertext
|
/// Authenticated encryption nonce and ciphertext
|
||||||
#[derive(Debug, Default, Clone)]
|
#[derive(Debug, Default, Clone)]
|
||||||
pub struct AeCiphertext {
|
pub struct AeCiphertext {
|
||||||
pub nonce: Nonce,
|
nonce: Nonce,
|
||||||
pub ciphertext: Ciphertext,
|
ciphertext: Ciphertext,
|
||||||
}
|
}
|
||||||
impl AeCiphertext {
|
impl AeCiphertext {
|
||||||
pub fn decrypt(&self, key: &AeKey) -> Option<u64> {
|
pub fn decrypt(&self, key: &AeKey) -> Option<u64> {
|
||||||
|
|
Loading…
Reference in New Issue