Struct bacteria::Strobe128 [−][src]
pub struct Strobe128 { /* fields omitted */ }
Expand description
A Strobe context for the 128-bit security level.
Implementations
impl Strobe128
[src]
impl Strobe128
[src]pub fn new(protocol_label: &[u8]) -> Strobe128
[src]
pub fn new(protocol_label: &[u8]) -> Strobe128
[src]Makes a new Strobe
object with a given protocol byte string and with security parameter 128bit.
pub fn set_as_receiver(&mut self)
[src]
pub fn set_as_sender(&mut self)
[src]
pub fn recv_mac(&mut self, data: &mut [u8], more: bool) -> Result<(), AuthError>
[src]
pub fn recv_mac(&mut self, data: &mut [u8], more: bool) -> Result<(), AuthError>
[src]Attempts to authenticate the current state against the given MAC. On failure, it returns an
AuthError
. It behooves the user of this library to check this return value and overreact
on error.
pub fn meta_recv_mac(
&mut self,
data: &mut [u8],
more: bool
) -> Result<(), AuthError>
[src]
pub fn meta_recv_mac(
&mut self,
data: &mut [u8],
more: bool
) -> Result<(), AuthError>
[src]Attempts to authenticate the current state against the given MAC. On failure, it returns an
AuthError
. It behooves the user of this library to check this return value and overreact
on error.
pub fn ratchet(&mut self, num_bytes_to_zero: usize, more: bool)
[src]
pub fn ratchet(&mut self, num_bytes_to_zero: usize, more: bool)
[src]Ratchets the internal state forward in an irreversible way by zeroing bytes.
Takes a usize
argument specifying the number of bytes of public state to zero. If the
size exceeds self.rate
, Keccak-f will be called before more bytes are zeroed.
pub fn meta_ratchet(&mut self, num_bytes_to_zero: usize, more: bool)
[src]
pub fn meta_ratchet(&mut self, num_bytes_to_zero: usize, more: bool)
[src]Ratchets the internal state forward in an irreversible way by zeroing bytes.
Takes a usize
argument specifying the number of bytes of public state to zero. If the
size exceeds self.rate
, Keccak-f will be called before more bytes are zeroed.
pub fn send_mac(&mut self, data: &mut [u8], more: bool)
[src]
pub fn send_mac(&mut self, data: &mut [u8], more: bool)
[src]Sends a MAC of the internal state. The output is independent of the initial contents of the input buffer.
pub fn meta_send_mac(&mut self, data: &mut [u8], more: bool)
[src]
pub fn meta_send_mac(&mut self, data: &mut [u8], more: bool)
[src]Sends a MAC of the internal state. The output is independent of the initial contents of the input buffer.
pub fn prf(&mut self, data: &mut [u8], more: bool)
[src]
pub fn prf(&mut self, data: &mut [u8], more: bool)
[src]Extracts pseudorandom data as a function of the internal state. The output is independent of the initial contents of the input buffer.
pub fn meta_prf(&mut self, data: &mut [u8], more: bool)
[src]
pub fn meta_prf(&mut self, data: &mut [u8], more: bool)
[src]Extracts pseudorandom data as a function of the internal state. The output is independent of the initial contents of the input buffer.
pub fn meta_ad(&mut self, data: &[u8], more: bool)
[src]
pub fn meta_ad(&mut self, data: &[u8], more: bool)
[src]Mixes associated data into the internal state.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Strobe128
impl Send for Strobe128
impl Sync for Strobe128
impl Unpin for Strobe128
impl UnwindSafe for Strobe128
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T, U> Cast<U> for T where
U: FromCast<T>,
impl<T, U> Cast<U> for T where
U: FromCast<T>,
pub fn cast(self) -> U
pub fn cast(self) -> U
Numeric cast from self
to T
.
impl<T> FromBits<T> for T
impl<T> FromBits<T> for T
pub fn from_bits(t: T) -> T
pub fn from_bits(t: T) -> T
Safe lossless bitwise transmute from T
to Self
.
impl<T> FromCast<T> for T
impl<T> FromCast<T> for T
pub fn from_cast(t: T) -> T
pub fn from_cast(t: T) -> T
Numeric cast from T
to Self
.
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
pub fn into_bits(self) -> U
pub fn into_bits(self) -> U
Safe lossless bitwise transmute from self
to T
.
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more