hsh 0.0.3

Quantum-Resistant Cryptographic Hash Library for Password Hashing and Verification in Rust
Documentation

Hash (HSH)

Quantum-Resistant Cryptographic Hash Library for Password Hashing and Verification in Rust đŸĻ€

Part of the Mini Functions family of libraries.

Hash (HSH) Banner

Made With Rust Crates.io Lib.rs Docs.rs License Codecov

â€ĸ Website â€ĸ Documentation â€ĸ Report Bug â€ĸ Request Feature â€ĸ Contributing Guidelines

divider

Overview 📖

The Hash (HSH) library is a cryptographic hash library for password hashing and verification in Rust, designed to provide robust security for passwords, utilizing the latest advancements in quantum-resistant cryptography.

The library is designed to be easy to use, with a simple API that allows for the generation, retrieval, and verification of password hashes.

It supports the following hash algorithms:

  • Argon2i: A memory- hard password hashing function designed to be secure against both brute-force attacks and rainbow table attacks.
  • Bcrypt: A password hashing function designed to be secure against brute-force attacks. It is a work-factor function, which means that it takes a certain amount of time to compute. This makes it difficult to attack with a brute-force algorithm.
  • Scrypt: A password hashing function designed to be secure against both brute-force attacks and rainbow table attacks. It is a memory-hard and work- factor function, which means that it requires a lot of memory and time to compute. This makes it very difficult to attack with a GPU or other parallel computing device.

Features ✨

  • Generates string representations of the hash
  • Includes methods for setting and verifying passwords against the hash
  • Provides functions for generating hashes and salts
  • Rust library for hashing and verifying passwords
  • Supports external crates such as argon2rs, base64, bcrypt, scrypt, and vrd.
  • Supports multiple hash algorithms (argon2i, bcrypt, scrypt)
  • Written in Rust for speed and security

Secure password storage

Hash (HSH) provides a secure way to store and verify hashed passwords. Passwords are hashed using the argon2i, bcrypt, scrypt algorithms, which are considered one of the most secure hashing algorithms available today. The library provides a simple interface for generating and verifying hashes, making it easy to implement secure password storage in any Rust application.

Easy to use

Hash (HSH) includes simple functions for generating and verifying password hashes, and managing password and salt values. Developers can easily integrate the library into their Rust projects and start using it right away. The library is designed to be intuitive and easy to use, so developers can build apps without worrying about password security.

Flexible

Hash (HSH) allows users to customize the length of passwords and salts used in generating hashes. This flexibility allows developers to tailor the library to their specific needs, whether they require shorter or longer password and salt values. The library also includes macros that make it easy to work with the Hash structure, allowing developers to quickly and easily set and retrieve password and salt values.

Lightweight

Hash (HSH) is a lightweight library that can easily integrate into any Rust project. The library has no external dependencies and is efficient. It means that developers can add secure password storage to their applications without having to worry about significant performance overheads.

Installation đŸ“Ļ

It takes just a few minutes to get up and running with hsh.

Requirements

The minimum supported Rust toolchain version is currently Rust 1.69.0 or later (stable). It is recommended that you install the latest stable version of Rust.

Platform support

Hash (HSH) is supported and tested on the following platforms:

Tier 1 platforms 🏆

Operating System Target Description
✅ Linux aarch64-unknown-linux-gnu 64-bit Linux systems on ARM architecture
✅ Linux i686-unknown-linux-gnu 32-bit Linux (kernel 3.2+, glibc 2.17+)
✅ Linux x86_64-unknown-linux-gnu 64-bit Linux (kernel 2.6.32+, glibc 2.11+)
✅ macOS x86_64-apple-darwin 64-bit macOS (10.7 Lion or later)
✅ Windows i686-pc-windows-gnu 32-bit Windows (7 or later)
✅ Windows i686-pc-windows-msvc 32-bit Windows (7 or later)
✅ Windows x86_64-pc-windows-gnu 64-bit Windows (7 or later)
✅ Windows x86_64-pc-windows-msvc 64-bit Windows (7 or later)

Tier 2 platforms đŸĨˆ

Operating System Target Description
✅ Linux aarch64-unknown-linux-musl 64-bit Linux systems on ARM architecture
✅ Linux arm-unknown-linux-gnueabi ARMv6 Linux (kernel 3.2, glibc 2.17)
✅ Linux arm-unknown-linux-gnueabihf ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17)
✅ Linux armv7-unknown-linux-gnueabihf ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17)
✅ Linux mips-unknown-linux-gnu MIPS Linux (kernel 2.6.32+, glibc 2.11+)
✅ Linux mips64-unknown-linux-gnuabi64 MIPS64 Linux (kernel 2.6.32+, glibc 2.11+)
✅ Linux mips64el-unknown-linux-gnuabi64 MIPS64 Linux (kernel 2.6.32+, glibc 2.11+)
✅ Linux mipsel-unknown-linux-gnu MIPS Linux (kernel 2.6.32+, glibc 2.11+)
✅ macOS aarch64-apple-darwin 64-bit macOS (10.7 Lion or later)
✅ Windows aarch64-pc-windows-msvc 64-bit Windows (7 or later)

The GitHub Actions shows the platforms in which the Hash (HSH) library tests are run.

Documentation

â„šī¸ Info: Please check out our website for more information and find our documentation on docs.rs, lib.rs and crates.io.

Usage 📖

To use hsh in your project, add the following to your Cargo.toml file:

[dependencies]
hsh = "0.0.3"

Add the following to your main.rs file:

extern crate hsh;
use hsh::*;

then you can use the functions in your application code.

Examples

Hash (HSH) comes with a set of examples that you can use to get started. The examples are located in the examples directory of the project. To run the examples, clone the repository and run the following command in your terminal from the project root directory.

cargo run --example hsh

Semantic Versioning Policy đŸšĨ

For transparency into our release cycle and in striving to maintain backward compatibility, Hash (HSH) follows semantic versioning.

License 📝

The project is licensed under the terms of both the MIT license and the Apache License (Version 2.0).

Contribution 🤝

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

divider

Acknowledgements 💙

A big thank you to all the awesome contributors of Mini Functions for their help and support.

And a special thank you goes to the Rust Reddit community for providing a lot of useful suggestions on how to improve this project.