[−][src]Struct win_crypto_ng::hash::HashAlgorithm
Hashing algorithm
Implementations
impl<Kind: AlgorithmKind> HashAlgorithm<Kind>
[src]
pub fn open(id: Kind) -> Result<Self>
[src]
Open a hash algorithm provider
Examples
let algo = HashAlgorithm::open(HashAlgorithmId::Sha256); assert!(algo.is_ok());
impl HashAlgorithm<HashAlgorithmId>
[src]
impl HashAlgorithm<MacAlgorithmId>
[src]
pub fn new_mac(&self, secret: &[u8], iv: Option<&[u8]>) -> Result<Hash>
[src]
Creates a new Message Authentication Code (MAC), if supported by the backing algorithm (AES-GMAC/AES-CMAC).
Passing IV is required for GMAC mode, otherwise don't pass it for OMAC.
Auto Trait Implementations
impl<Kind> RefUnwindSafe for HashAlgorithm<Kind> where
Kind: RefUnwindSafe,
Kind: RefUnwindSafe,
impl<Kind> Send for HashAlgorithm<Kind> where
Kind: Send,
Kind: Send,
impl<Kind> !Sync for HashAlgorithm<Kind>
impl<Kind> Unpin for HashAlgorithm<Kind> where
Kind: Unpin,
Kind: Unpin,
impl<Kind> UnwindSafe for HashAlgorithm<Kind> where
Kind: UnwindSafe,
Kind: UnwindSafe,
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, 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>,