Class CryptoUtils

java.lang.Object
com.renomad.minum.utils.CryptoUtils

public final class CryptoUtils extends Object
Handy helpers for dealing with cryptographic functions
  • Method Details

    • bytesToHex

      public static String bytesToHex(byte[] bytes)
      Converts an array of bytes to their corresponding hex string
      Parameters:
      bytes - an array of bytes
      Returns:
      a hex string of that array
    • createPasswordHash

      public static 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.

      See docs/http_protocol/password_storage_cheat_sheet