mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-19 15:05:47 +01:00
simplify aes-gcm imports and add tag size constants
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
#![allow(unused_variables, dead_code)]
|
||||
use crate::{LimboError, Result};
|
||||
use aegis::aegis256::Aegis256;
|
||||
use aes_gcm::{
|
||||
aead::{Aead, AeadCore, KeyInit, OsRng},
|
||||
Aes256Gcm, Key, Nonce,
|
||||
};
|
||||
use aes_gcm::aead::{AeadCore, OsRng};
|
||||
use std::ops::Deref;
|
||||
// AEGIS-256 supports both 16 and 32 byte tags, we use the 16 byte variant, it is faster
|
||||
// and provides sufficient security for our use case.
|
||||
const AEGIS_TAG_SIZE: usize = 16;
|
||||
const AES256GCM_TAG_SIZE: usize = 16;
|
||||
|
||||
#[repr(transparent)]
|
||||
#[derive(Clone)]
|
||||
|
||||
Reference in New Issue
Block a user