mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-25 04:35:17 +00:00
Remove dead code
This commit is contained in:
@@ -197,7 +197,7 @@ pub trait HmacKey: Send + Sync {
|
||||
pub struct ExportKeyingMaterialError;
|
||||
|
||||
/// A pseudo random key for HKDF
|
||||
pub trait HandshakeTokenKey: Send + Sized + Sync {
|
||||
pub trait HandshakeTokenKey: Send + Sync {
|
||||
/// AEAD key type
|
||||
type AeadKey: AeadKey;
|
||||
|
||||
@@ -209,10 +209,6 @@ pub trait HandshakeTokenKey: Send + Sized + Sync {
|
||||
|
||||
/// A key for sealing data with AEAD-based algorithms
|
||||
pub trait AeadKey {
|
||||
/// Length of AEAD Key
|
||||
const KEY_LEN: usize;
|
||||
|
||||
// fn from_hkdf(master_key: &impl PseudoRandomKey, random_bytes: &[u8]) -> Self;
|
||||
/// Method for sealing message `data`
|
||||
fn seal(&self, data: &mut Vec<u8>, additional_data: &[u8]) -> Result<(), CryptoError>;
|
||||
/// Method for opening a sealed message `data`
|
||||
|
||||
@@ -36,8 +36,6 @@ impl crypto::HandshakeTokenKey for hkdf::Prk {
|
||||
}
|
||||
|
||||
impl crypto::AeadKey for aead::LessSafeKey {
|
||||
const KEY_LEN: usize = 32;
|
||||
|
||||
fn seal(&self, data: &mut Vec<u8>, additional_data: &[u8]) -> Result<(), CryptoError> {
|
||||
let aad = ring::aead::Aad::from(additional_data);
|
||||
let zero_nonce = ring::aead::Nonce::assume_unique_for_key([0u8; 12]);
|
||||
|
||||
Reference in New Issue
Block a user