summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/crypto.rs11
1 files changed, 1 insertions, 10 deletions
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<const N: usize> Seal for [u8; N] {}
- impl<L: Seal, R: Seal> Seal for (L, R) {}
- }
-
- pub trait FromHkdf: private::Seal {
+ pub trait FromHkdf {
const SIZE: usize;
fn from_hkdf(bytes: &[u8]) -> Self;
}