Class MD5HashFunction

java.lang.Object
eu.webtoolkit.jwt.auth.HashFunction
eu.webtoolkit.jwt.auth.MD5HashFunction

public class MD5HashFunction extends HashFunction
A cryptograhpic hash function implemented using MD5. This hash function is useful for creating token hashes, but should not be used for password hashes.
  • Constructor Details

    • MD5HashFunction

      public MD5HashFunction()
  • Method Details

    • compute

      public String compute(String msg, String salt)
      Description copied from class: HashFunction
      Computes the hash of a message + salt.

      The message is usually an ASCII or UTF-8 string.

      The salt and the computed hash are encoded in printable characters. This is usually ASCII-encoded or could be Base64-encoded.

      Specified by:
      compute in class HashFunction
    • getName

      public String getName()
      Returns the name for this hash function. Returns "MD5".
      Specified by:
      getName in class HashFunction