Class SCryptImplementation

java.lang.Object
org.apache.openmeetings.util.crypt.SCryptImplementation
All Implemented Interfaces:
ICrypt

public class SCryptImplementation extends Object implements ICrypt
  • Method Details

    • hash

      public String hash(String str)
      Description copied from interface: ICrypt
      Creates hash of given string
      Specified by:
      hash in interface ICrypt
      Parameters:
      str - - string to calculate hash for
      Returns:
      hash of passed string
    • verify

      public boolean verify(String str, String hash)
      Description copied from interface: ICrypt
      Verify string passed is matches given hash
      Specified by:
      verify in interface ICrypt
      Parameters:
      str - - string to check hash for
      hash - - hash to compare
      Returns:
      true in case string matches hash, false otherwise
    • fallback

      public boolean fallback(String str, String hash)
      Description copied from interface: ICrypt
      Verify string passed is matches given hash (using fallback crypt mechanism)
      Specified by:
      fallback in interface ICrypt
      Parameters:
      str - - string to check hash for
      hash - - hash to compare
      Returns:
      true in case string matches hash, false otherwise
    • randomPassword

      public String randomPassword(int length)
      Specified by:
      randomPassword in interface ICrypt