Module mini_functions::hash

source ·
Expand description

Provides access to hash functions. Application hash functionality

Provides access to hash functions and types.

Modules

  • The algorithms module contains the password hashing algorithms.
  • The macros module contains functions for generating macros.
  • The loggers module contains the loggers for the library.
  • The macros module contains functions for generating macros.
  • The models module contains the data models for the library.

Macros

  • This macro generates a new hash for a given password, salt, and algorithm.
  • This macro returns the length of the password for a given Hash struct instance.
  • 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.
  • This macro asserts that the given condition is true. If the condition is false, the macro panics with the message “Assertion failed!”.
  • This macro checks if the given string contains the given substring.
  • This macro checks if the given value is within the given range. The range is inclusive of both endpoints.
  • This macro joins the given strings together with the given separator.
  • This macro finds the maximum value of the given values.
  • This macro finds the minimum value of the given values.
  • 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.
  • This macro prints the given arguments to the console.
  • This macro prints the given vector of values to the console. Each value is printed on a new line.
  • This macro splits the given string into a vector of strings. The string is split on whitespace characters.
  • This macro creates a new vector with the given elements.
  • Macros related to executing shell commands.
  • Custom logging macro for various log levels and formats.
  • This macro matches the hash algorithm strings to their corresponding enum variants.
  • This macro creates a new instance of the Hash struct with the given password, salt, and algorithm.
  • This macro generates a random string of the given length. The string consists of alphanumeric characters (both upper and lower case).
  • 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

  • This is the main entry point for the Hash (HSH) library.