mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-18 21:34:37 +03:00
Rename hash selection enum to KeyedHash, restructure traits
This commit is contained in:
20
cipher-traits/src/algorithms.rs
Normal file
20
cipher-traits/src/algorithms.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
pub mod keyed_hash_blake2b {
|
||||
use crate::primitives::keyed_hash::*;
|
||||
|
||||
pub const KEY_LEN: usize = 32;
|
||||
pub const OUT_LEN: usize = 32;
|
||||
|
||||
pub trait KeyedHashBlake2b: KeyedHash<KEY_LEN, OUT_LEN> {}
|
||||
}
|
||||
|
||||
pub mod keyed_hash_shake256 {
|
||||
use crate::primitives::keyed_hash::*;
|
||||
|
||||
pub const KEY_LEN: usize = 32;
|
||||
pub const OUT_LEN: usize = 32;
|
||||
|
||||
pub trait KeyedHashShake256: KeyedHash<KEY_LEN, OUT_LEN> {}
|
||||
}
|
||||
|
||||
pub use keyed_hash_blake2b::KeyedHashBlake2b;
|
||||
pub use keyed_hash_shake256::KeyedHashShake256;
|
||||
Reference in New Issue
Block a user