Crate crypto_hash [] [src]

A set of cryptographic hash functions provided by the operating system, when available.

The purpose of this crate is to provide access to hash algorithms with as few dependencies as possible. This means that when possible, the library uses the hashing functions that are provided by the given operating system's bundled cryptographic libraries.

Supported Implementations

By operating system:

  • Windows: CryptoAPI
  • Mac OS X: CommonCrypto
  • Linux/BSD/etc.: OpenSSL

Supported Algorithms

  • MD5
  • SHA1
  • SHA256
  • SHA512

Structs

Hasher

Generator of digests using a cryptographic hash function.

Enums

Algorithm

Available cryptographic hash functions.

Functions

digest

Helper function for Hasher which generates a cryptographic digest from the given data and algorithm.

hex_digest

Helper function for Hasher which generates a cryptographic digest serialized in hexadecimal from the given data and algorithm.