Add blueprint for aes encryption
This commit is contained in:
committed by
Michael Vines
parent
abe6b27b34
commit
72ade5473a
30
zk-token-sdk/src/encryption/aes.rs
Normal file
30
zk-token-sdk/src/encryption/aes.rs
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
|
||||
pub struct AES;
|
||||
impl AES {
|
||||
pub fn new() -> AESKey {
|
||||
AESKey
|
||||
}
|
||||
|
||||
pub fn encrypt(sk: &AESKey, amount: u64) -> AESCiphertext {
|
||||
AESCiphertext
|
||||
}
|
||||
|
||||
pub fn decrypt(sk: &AESKey, ct: &AESCiphertext) -> u64 {
|
||||
0_u64
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AESKey;
|
||||
impl AESKey {
|
||||
pub fn encrypt(&self, amount: u64) -> AESCiphertext {
|
||||
AES::encrypt(self, amount)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AESCiphertext;
|
||||
impl AESCiphertext {
|
||||
pub fn decrypt(&self, sk: &AESKey) -> u64 {
|
||||
AES::decrypt(sk, self)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user