HashingUtil
HashingUtil
class provides utility methods for hashing data using various algorithms. It offers a simple and convenient way to generate hash values for different data types. The class is designed to be thread-safe.
Methods
md2Hex(String: str): String
(String: str): String
Calculates the MD2 digest and returns the value as a 32 character hex string.
@paramstr
— The string to hash.
@return — MD2 digest as a hex string.
md5Hex(String: str): String
(String: str): String
Calculates the MD5 digest and returns the value as a 32 character hex string.
@paramstr
— The string to hash.
@return — MD5 digest as a hex string.
sha1Hex(String: str): String
(String: str): String
Calculates the SHA-1 digest and returns the value as a hex string.
@paramstr
— The string to hash.
@return — SHA-1 digest as a hex string.
sha256Hex(String: str): String
(String: str): String
Calculates the SHA-256 digest and returns the value as a hex string.
@paramstr
— The string to hash.
@return — SHA-256 digest as a hex string.
sha384Hex(String: str): String
(String: str): String
Calculates the SHA-384 digest and returns the value as a hex string.
@paramstr
— The string to hash.
@return — SHA-384 digest as a hex string.
sha3_224Hex(String: str): String
(String: str): String
Calculates the SHA3-224 digest and returns the value as a hex string.
@paramstr
— The string to hash.
@return — SHA3-224 digest as a hex string.
sha3_256Hex(String: str): String
(String: str): String
Calculates the SHA3-256 digest and returns the value as a hex string.
@paramstr
— The string to hash.
@return — SHA3-256 digest as a hex string.
sha3_384Hex(String: str): String
(String: str): String
Calculates the SHA3-384 digest and returns the value as a hex string.
@paramstr
— The string to hash.
@return — SHA3-384 digest as a hex string.
sha3_512Hex(String: str): String
(String: str): String
Calculates the SHA3-512 digest and returns the value as a hex string.
@paramstr
— The string to hash.
@return — SHA3-512 digest as a hex string.
sha512Hex(String: str): String
(String: str): String
Calculates the SHA-512 digest and returns the value as a hex string.
@paramstr
— The string to hash.
@return — SHA-512 digest as a hex string.
sha512_256Hex(String: str): String
(String: str): String
Calculates the SHA-512/256 digest and returns the value as a hex string.
@paramstr
— The string to hash.
@return — SHA-512/256 digest as a hex string.