From 1ef9d67fb6979ea91812c4ea892f7ecc12b3170f Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 17 Jul 2022 15:21:27 +0200 Subject: remove Seal from crypto the trait doesn't leave the module, so sealing doesn't do anything useful. --- src/crypto.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src') diff --git a/src/crypto.rs b/src/crypto.rs index 2063c9b..58ab6d2 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -40,16 +40,7 @@ mod from_hkdf { use hkdf::Hkdf; use sha2::Sha256; - // sealing lets us guarantee that SIZE is always correct, - // which means that from_hkdf always receives correctly sized slices - // and copies never fail - mod private { - pub trait Seal {} - impl Seal for [u8; N] {} - impl Seal for (L, R) {} - } - - pub trait FromHkdf: private::Seal { + pub trait FromHkdf { const SIZE: usize; fn from_hkdf(bytes: &[u8]) -> Self; } -- cgit v1.2.3