Add some tests

This commit is contained in:
Rodolphe Bréard 2024-02-17 17:58:42 +01:00
parent f3c6dee007
commit cfdfcec03e
2 changed files with 40 additions and 1 deletions

View file

@ -40,7 +40,7 @@ impl InputKeyMaterial {
Ok(res.try_into().unwrap())
}
fn from_bytes(b: [u8; IKM_STRUCT_SIZE]) -> Result<Self, Error> {
pub(crate) fn from_bytes(b: [u8; IKM_STRUCT_SIZE]) -> Result<Self, Error> {
Ok(Self {
id: u32::from_le_bytes(b[0..4].try_into().unwrap()),
scheme: u32::from_le_bytes(b[4..8].try_into().unwrap()).try_into()?,