[−][src]Struct zeros::Keccak
Keccak
Examples
use zeros::Hash; let mut keccak = Hash::Shake128.new_keccak(); keccak.update("test"); assert_eq!( keccak.finish(), &[ 0xd3, 0xb0, 0xaa, 0x9c, 0xd8, 0xb7, 0x25, 0x56, 0x22, 0xce, 0xbc, 0x63, 0x1e, 0x86, 0x7d, 0x40, ], );
Implementations
impl Keccak
[src]
pub const fn hash(&self) -> &Hash
[src]
pub fn update<B>(&mut self, bytes: B) -> usize where
B: AsRef<[u8]>,
[src]
B: AsRef<[u8]>,
Updates new data
Returns length of input bytes.
pub fn finish(mut self: Self) -> Vec<u8>
[src]
pub fn finish_as_hex(self) -> String
[src]
Trait Implementations
impl Clone for Keccak
[src]
impl Debug for Keccak
[src]
impl Eq for Keccak
[src]
impl From<&'_ Hash> for Keccak
[src]
impl From<Hash> for Keccak
[src]
impl PartialEq<Keccak> for Keccak
[src]
impl StructuralEq for Keccak
[src]
impl StructuralPartialEq for Keccak
[src]
impl Write for Keccak
[src]
pub fn write(&mut self, buf: &[u8]) -> IoResult<usize>
[src]
pub fn flush(&mut self) -> IoResult<()>
[src]
pub fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>
1.36.0[src]
pub fn is_write_vectored(&self) -> bool
[src]
pub fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
pub fn write_all_vectored(
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
[src]
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
pub fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>
1.0.0[src]
pub fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for Keccak
[src]
impl Send for Keccak
[src]
impl Sync for Keccak
[src]
impl Unpin for Keccak
[src]
impl UnwindSafe for Keccak
[src]
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>,