mash-rs

Crates.iomash-rs
lib.rsmash-rs
version0.0.1
sourcesrc
created_at2024-08-24 16:06:58.184616
updated_at2024-08-24 16:06:58.184616
descriptionHashing Algorithms
homepage
repositoryhttps://github.com/piot/mash-rs
max_upload_size
id1350391
size8,454
Peter Bjorklund (piot)

documentation

README

Mash - Hashing Functions Library for Rust

This crate provides a collection of hashing functions for Rust, including Murmur3, a fast and efficient hash algorithm.

Available Hash Functions

  • Murmur3 (32-bit): A fast, non-cryptographic hash function suitable for hash tables and other hash-based data structures.

Installation

To use this crate in your Rust project, add it to your Cargo.toml:

[dependencies]
mash-rs = "0.0.1"

Usage

use mash_rs::murmur3_32;

fn main() {
    let data = b"hello world";
    let seed = 42;  // Arbitrary seed value
    let hash = murmur3_32(data, seed);
    println!("Murmur3 hash value: {:#x}", hash);
}

Description

The murmur3_32 function computes a 32-bit hash value for the given data using the Murmur3 hash algorithm.

In addition to Murmur3, this library provides other hashing functions. Check the documentation for more details on available algorithms and how to use them.

License

This is licensed under the MIT License. See the LICENSE file for more details.

Commit count: 0

cargo fmt