java.lang.Object
com.renomad.minum.utils.CryptoUtils
Handy helpers for dealing with cryptographic functions
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
bytesToHex
(byte[] bytes) Converts an array of bytes to their corresponding hex stringstatic String
createPasswordHash
(String password, String salt) Hash the input string with the provided PBKDF2 algorithm, and return a string representation Note that the PBKDF2WithHmacSHA1 algorithm is specifically designed to take a long time, to slow down an attacker.
-
Method Details
-
bytesToHex
Converts an array of bytes to their corresponding hex string- Parameters:
bytes
- an array of bytes- Returns:
- a hex string of that array
-
createPasswordHash
Hash the input string with the provided PBKDF2 algorithm, and return a string representation Note that the PBKDF2WithHmacSHA1 algorithm is specifically designed to take a long time, to slow down an attacker.See docs/http_protocol/password_storage_cheat_sheet
-