Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

kbkdf/
sealed.rs

1//! The module provides the sealed trait [R].
2
3use digest::{
4    array::typenum::Unsigned,
5    consts::{U8, U16, U24, U32},
6};
7
8mod private {
9    use digest::consts::{U8, U16, U24, U32};
10
11    pub trait Sealed {}
12
13    impl Sealed for U8 {}
14    impl Sealed for U16 {}
15    impl Sealed for U24 {}
16    impl Sealed for U32 {}
17}
18
19/// Marker used to register valid values for R in the KBKDF.
20pub trait R: Unsigned + private::Sealed {}
21
22impl R for U8 {}
23impl R for U16 {}
24impl R for U24 {}
25impl R for U32 {}