Interface ICrypt

  • All Known Implementing Classes:
    SCryptImplementation

    public interface ICrypt
    Interface for Encryption-Class see: https://openmeetings.apache.org/CustomCryptMechanism.html see: https://crackstation.net/hashing-security.htm
    Author:
    sebastianwagner, solomax
    • Method Detail

      • hash

        String hash​(String str)
        Creates hash of given string
        Parameters:
        str - - string to calculate hash for
        Returns:
        hash of passed string
      • verify

        boolean verify​(String str,
                       String hash)
        Verify string passed is matches given hash
        Parameters:
        str - - string to check hash for
        hash - - hash to compare
        Returns:
        true in case string matches hash, false otherwise
      • fallback

        boolean fallback​(String str,
                         String hash)
        Verify string passed is matches given hash (using fallback crypt mechanism)
        Parameters:
        str - - string to check hash for
        hash - - hash to compare
        Returns:
        true in case string matches hash, false otherwise
      • randomPassword

        String randomPassword​(int length)