Remove dead code

This commit is contained in:
Benjamin Saunders
2021-10-10 14:46:32 -07:00
parent d60c9c282d
commit 2575356c88
2 changed files with 1 additions and 7 deletions
+1 -5
View File
@@ -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`
-2
View File
@@ -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]);