pub struct MandalaHash { /* private fields */ }Implementations§
Source§impl MandalaHash
impl MandalaHash
pub fn new(params: MandalaParams) -> Self
Sourcepub fn expand(&self, len: usize) -> Vec<u8> ⓘ
pub fn expand(&self, len: usize) -> Vec<u8> ⓘ
Derive len bytes of key material (XOF expansion).
Sourcepub fn subkey(&self, context: &str) -> [u8; 32]
pub fn subkey(&self, context: &str) -> [u8; 32]
Derive a named subkey (different contexts → independent keys).
Sourcepub fn encryption_key(&self) -> [u8; 32]
pub fn encryption_key(&self) -> [u8; 32]
Derive an encryption key (AES-GCM or XChaCha20 ready).
Sourcepub fn signing_seed(&self) -> [u8; 32]
pub fn signing_seed(&self) -> [u8; 32]
Derive a signing seed (Ed25519 ready).
pub fn params(&self) -> &MandalaParams
Auto Trait Implementations§
impl Freeze for MandalaHash
impl RefUnwindSafe for MandalaHash
impl Send for MandalaHash
impl Sync for MandalaHash
impl Unpin for MandalaHash
impl UnsafeUnpin for MandalaHash
impl UnwindSafe for MandalaHash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more