[zk-token-sdk] Make `AeCiphertext` inner fields be private (#32188)

make `AeCiphertext` fields and types be private
This commit is contained in:
samkim-crypto 2023-06-21 06:07:58 +09:00 committed by GitHub
parent 1616123b84
commit 91ec92cd76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -192,14 +192,14 @@ impl SeedDerivable for AeKey {
/// For the purpose of encrypting balances for the spl token accounts, the nonce and ciphertext
/// sizes should always be fixed.
pub type Nonce = [u8; 12];
pub type Ciphertext = [u8; 24];
type Nonce = [u8; 12];
type Ciphertext = [u8; 24];
/// Authenticated encryption nonce and ciphertext
#[derive(Debug, Default, Clone)]
pub struct AeCiphertext {
pub nonce: Nonce,
pub ciphertext: Ciphertext,
nonce: Nonce,
ciphertext: Ciphertext,
}
impl AeCiphertext {
pub fn decrypt(&self, key: &AeKey) -> Option<u64> {