Expand description
Specializes in Quantum-Resistant Cryptographic Hashing. Application hash functionality
Provides access to hash functions and types.
Modules§
- algorithms
- The
algorithms
module contains the password hashing algorithms. - hsh_
macros - The
macros
module contains functions for generating macros. - loggers
- The
loggers
module contains the loggers for the library. - macros
- The
macros
module contains functions for generating macros. - models
- The
models
module contains the data models for the library.
Macros§
- generate_
hash - This macro generates a new hash for a given password, salt, and algorithm.
- hash_
length - This macro returns the length of the password for a given
Hash
struct instance. - hsh
- This macro takes any number of arguments and parses them into a Rust
value. The parsed value is returned wrapped in
hsh::Hash::parse()
function call. - hsh_
assert - This macro asserts that the given condition is true. If the condition is false, the macro panics with the message “Assertion failed!”.
- hsh_
contains - This macro checks if the given string contains the given substring.
- hsh_
in_ range - This macro checks if the given value is within the given range. The range is inclusive of both endpoints.
- hsh_
join - This macro joins the given strings together with the given separator.
- hsh_max
- This macro finds the maximum value of the given values.
- hsh_min
- This macro finds the minimum value of the given values.
- hsh_
parse - This macro attempts to parse the given input into a u64 value. If parsing fails, an error is returned with a message indicating the failure.
- hsh_
print - This macro prints the given arguments to the console.
- hsh_
print_ vec - This macro prints the given vector of values to the console. Each value is printed on a new line.
- hsh_
split - This macro splits the given string into a vector of strings. The string is split on whitespace characters.
- hsh_vec
- This macro creates a new vector with the given elements.
- macro_
execute_ and_ log - Macros related to executing shell commands.
- macro_
log_ info - Custom logging macro for various log levels and formats.
- match_
algo - This macro matches the hash algorithm strings to their corresponding enum variants.
- new_
hash - This macro creates a new instance of the
Hash
struct with the given password, salt, and algorithm. - random_
string - This macro generates a random string of the given length. The string consists of alphanumeric characters (both upper and lower case).
- to_
str_ error - This macro abstracts away the error handling for the
to_string
method. If the method fails, an error is returned with the failure message.
Functions§
- run
- This is the main entry point for the
Hash (HSH)
library.