Replace the encrypt and decrypt function by the CipherBox struct

This commit is contained in:
Rodolphe Bréard 2024-03-17 14:23:03 +01:00
parent 47557fe350
commit 749dc03f71
5 changed files with 84 additions and 69 deletions

View file

@ -1,4 +1,4 @@
use crate::encryption::EncryptedData;
use crate::cipher_box::EncryptedData;
use crate::error::Result;
use chacha20poly1305::aead::{Aead, KeyInit, Payload};
use chacha20poly1305::{Key, XChaCha20Poly1305, XNonce};