feat: add file

This commit is contained in:
2023-02-12 14:42:50 +08:00
parent 00ad916fdb
commit cfa66dabaf
4 changed files with 87 additions and 37 deletions

View File

@@ -1,12 +1,8 @@
use aes_gcm::{Aes256Gcm, AesGcm, Key, KeyInit, Nonce};
use aes_gcm::aead::{Aead, AeadMut, OsRng};
use aes_gcm::aead::generic_array::GenericArray;
use aes_gcm::aes::{Aes256, Aes256Enc};
use aes_gcm::aes::cipher::{Block, BlockEncrypt, BlockEncryptMut, Iv};
use aes_gcm::aes::cipher::inout::{InOut, InOutBuf};
#[test]
fn test_aes_gcm_01() {
use aes_gcm::{Aes256Gcm, Key, KeyInit, Nonce};
use aes_gcm::aead::{Aead};
let data_key = hex::decode("0001020304050607080910111213141516171819202122232425262728293031").unwrap();
let nonce = hex::decode("000102030405060708091011").unwrap();
@@ -32,6 +28,9 @@ fn test_aes_gcm_01() {
#[test]
fn test_aes_gcm_02() {
use aes_gcm::{Aes256Gcm, Key, KeyInit, Nonce};
use aes_gcm::aead::{Aead};
let data_key = hex::decode("aa01020304050607080910111213141516171819202122232425262728293031").unwrap();
let nonce = hex::decode("aa0102030405060708091011").unwrap();