Add export_key method to Aes256Encryption

This commit is contained in:
Sosthene 2024-06-27 17:16:26 +02:00 committed by Nicolas Cantu
parent 676acebd8d
commit 3f96ce339b

View File

@ -254,6 +254,10 @@ impl Aes256Encryption {
}) })
} }
pub fn export_key(&self) -> [u8;32] {
self.aes_key
}
pub fn encrypt_with_aes_key(&self) -> Result<CipherText> { pub fn encrypt_with_aes_key(&self) -> Result<CipherText> {
match self.purpose { match self.purpose {
Purpose::Login => self.encrypt_login(), Purpose::Login => self.encrypt_login(),