[−][src]Struct rcrypto::Keccak
Implementations
impl Keccak
[src]
pub fn new(b: usize, nr: u32) -> Result<Keccak, CryptoError>
[src]
KECCAK-p[b,nr]
b means that the width of the permutation;
nr means that the number of rounds;
pub fn keccak_25(nr: u32) -> Self
[src]
pub fn keccak_50(nr: u32) -> Self
[src]
pub fn keccak_100(nr: u32) -> Self
[src]
pub fn keccak_200(nr: u32) -> Self
[src]
pub fn keccak_400(nr: u32) -> Self
[src]
pub fn keccak_800(nr: u32) -> Self
[src]
pub fn keccak_1600(nr: u32) -> Self
[src]
pub fn widths(&self) -> usize
[src]
the permutation widths
pub fn permutation(
&mut self,
byte_data: &[u8],
results: &mut Vec<u8>
) -> Result<usize, CryptoError>
[src]
&mut self,
byte_data: &[u8],
results: &mut Vec<u8>
) -> Result<usize, CryptoError>
perform the KECCAK-p[b,nr] permutation, the byte_data.len()
must be greater than or
equal to (self.widths() + 7) / 8
. The extra bits will be discarded when the byte_data.len()
greater than the (self.widths() + 7) / 8
, the bits processed from left to right in writing order
and return the bit lengths of the results
if success.;
pub fn sponge(&self, rate: usize) -> Result<KeccakSponge, CryptoError>
[src]
Sponge[Keccak-p[b,nr], pad10*1, rate]
rate
must be a positive integer and strictly less than the width self.widths()
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Keccak
impl Send for Keccak
impl Sync for Keccak
impl Unpin for Keccak
impl UnwindSafe for Keccak
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,