pub struct Blake2b { /* private fields */ }
Expand description
BLAKE2b streaming state.
Implementations§
source§impl Blake2b
impl Blake2b
sourcepub fn new(
secret_key: &SecretKey,
size: usize
) -> Result<Self, UnknownCryptoError>
pub fn new( secret_key: &SecretKey, size: usize ) -> Result<Self, UnknownCryptoError>
Initialize a Blake2b
struct with a given size (in bytes) and key.
sourcepub fn reset(
&mut self,
secret_key: &SecretKey
) -> Result<(), UnknownCryptoError>
pub fn reset( &mut self, secret_key: &SecretKey ) -> Result<(), UnknownCryptoError>
Reset to new()
state.
sourcepub fn update(&mut self, data: &[u8]) -> Result<(), UnknownCryptoError>
pub fn update(&mut self, data: &[u8]) -> Result<(), UnknownCryptoError>
Update state with data
. This can be called multiple times.
sourcepub fn finalize(&mut self) -> Result<Tag, UnknownCryptoError>
pub fn finalize(&mut self) -> Result<Tag, UnknownCryptoError>
Return a BLAKE2b tag.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Blake2b
impl Send for Blake2b
impl Sync for Blake2b
impl Unpin for Blake2b
impl UnwindSafe for Blake2b
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