[−][src]Struct sodiumoxide::crypto::auth::hmacsha512256::State
Authentication State
State for multi-part (streaming) authenticator tag (HMAC) computation.
When a State
goes out of scope its contents will be zeroed out.
NOTE: the streaming interface takes variable length keys, as opposed to the
simple interface which takes a fixed length key. The streaming interface also does not
define its own Key
type, instead using slices for its init()
method.
The caller of the functions is responsible for zeroing out the key after it's been used
(in contrast to the simple interface which defines a Drop
implementation for Key
).
NOTE: these functions are specific to libsodium
and do not exist in NaCl
.
Methods
impl State
[src]
pub fn init(k: &[u8]) -> State
[src]
init()
initializes an authentication structure using a secret key 'k'.
pub fn update(&mut self, in_: &[u8])
[src]
update()
can be called more than once in order to compute the authenticator
from sequential chunks of the message.
pub fn finalize(self) -> Tag
[src]
finalize()
finalizes the authenticator computation and returns a Tag
. finalize
consumes the State
so that it cannot be accidentally reused.
Trait Implementations
Auto Trait Implementations
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
impl RefUnwindSafe for State
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,