Skip to main content

Crate hashing

Crate hashing 

Source
Expand description

§Hashing

A robust, production-ready hashing library supporting multiple cryptographic algorithms.

§Features

  • Multiple hash algorithms (MD5, SHA-1, SHA-2, SHA-3, BLAKE2, BLAKE3)
  • String and file hashing
  • Export to multiple formats (JSON, hex, base64)
  • Zero-copy streaming for large files
  • Comprehensive error handling

§Example

use hashing::{hash_string, Algorithm};

let digest = hash_string("hello world", Algorithm::Sha256).unwrap();
println!("SHA-256: {}", digest);

Structs§

HashResult
Hash result with metadata

Enums§

Algorithm
Supported hashing algorithms
HashError
Errors that can occur during hashing operations

Traits§

Blake2Digest
Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
Md5Digest
Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
Sha2Digest
Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
Sha3Digest
Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.

Functions§

hash_bytes
Hash a byte slice using the specified algorithm
hash_file
Hash a file using the specified algorithm with streaming
hash_string
Hash a string using the specified algorithm

Type Aliases§

Result
Result type for hashing operations