Type Alias blake2::Blake2sMac256
source · pub type Blake2sMac256 = Blake2sMac<U32>;
Expand description
BLAKE2s-256 MAC state.
Aliased Type§
struct Blake2sMac256 { /* private fields */ }
Implementations
source§impl<OutSize> Blake2sMac<OutSize>
impl<OutSize> Blake2sMac<OutSize>
sourcepub fn new_with_salt_and_personal(
key: &[u8],
salt: &[u8],
persona: &[u8],
) -> Result<Self, InvalidLength>
pub fn new_with_salt_and_personal( key: &[u8], salt: &[u8], persona: &[u8], ) -> Result<Self, InvalidLength>
Create new instance using provided key, salt, and persona.
Key length should not be bigger than block size, salt and persona length should not be bigger than quarter of block size. If any of those conditions is false the method will return an error.
Trait Implementations
source§impl<OutSize> Clone for Blake2sMac<OutSize>
impl<OutSize> Clone for Blake2sMac<OutSize>
source§fn clone(&self) -> Blake2sMac<OutSize>
fn clone(&self) -> Blake2sMac<OutSize>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<OutSize> Debug for Blake2sMac<OutSize>
impl<OutSize> Debug for Blake2sMac<OutSize>
source§impl<OutSize> FixedOutput for Blake2sMac<OutSize>
impl<OutSize> FixedOutput for Blake2sMac<OutSize>
source§fn finalize_into(self, out: &mut Output<Self>)
fn finalize_into(self, out: &mut Output<Self>)
Consume value and write result into provided array.
source§fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>
fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and consume the hasher instance.
source§impl<OutSize> KeyInit for Blake2sMac<OutSize>
impl<OutSize> KeyInit for Blake2sMac<OutSize>
source§fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
Create new value from variable size key.
source§fn generate_key(
rng: impl CryptoRng + RngCore,
) -> GenericArray<u8, Self::KeySize>
fn generate_key( rng: impl CryptoRng + RngCore, ) -> GenericArray<u8, Self::KeySize>
Generate random key using the provided
CryptoRng
.source§impl<OutSize> KeySizeUser for Blake2sMac<OutSize>
impl<OutSize> KeySizeUser for Blake2sMac<OutSize>
source§impl<OutSize> OutputSizeUser for Blake2sMac<OutSize>
impl<OutSize> OutputSizeUser for Blake2sMac<OutSize>
§type OutputSize = OutSize
type OutputSize = OutSize
Size of the output in bytes.
source§fn output_size() -> usize
fn output_size() -> usize
Return output size in bytes.