feat: v0.2.0-alpha-1, performance improved from 36MB/s to ~450MB/s
This commit is contained in:
@@ -17,11 +17,14 @@ pub use decryptor::Aes256GcmStreamDecryptor;
|
||||
pub use encryptor::Aes128GcmStreamEncryptor;
|
||||
pub use encryptor::Aes192GcmStreamEncryptor;
|
||||
pub use encryptor::Aes256GcmStreamEncryptor;
|
||||
pub use encryptor2::Aes256GcmStreamEncryptor2;
|
||||
|
||||
mod util;
|
||||
mod encryptor;
|
||||
mod decryptor;
|
||||
|
||||
mod encryptor2;
|
||||
|
||||
#[test]
|
||||
fn test128() {
|
||||
use aes_gcm::{aead::{Aead, Nonce, Payload}, Aes128Gcm, KeyInit};
|
||||
@@ -198,6 +201,7 @@ fn test256() {
|
||||
];
|
||||
|
||||
for (key, nonce, aad, plaintext) in knp {
|
||||
println!("======= {} {} {} {}", hex::encode(key), hex::encode(nonce), hex::encode(aad), hex::encode(plaintext));
|
||||
// encrypt
|
||||
let mut ciphertext = vec![];
|
||||
let mut encryptor = Aes256GcmStreamEncryptor::new(key.clone(), &nonce);
|
||||
|
||||
Reference in New Issue
Block a user