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
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    fallback(String str, String hash)
    Verify string passed is matches given hash (using fallback crypt mechanism)
    hash(String str)
    Creates hash of given string
    randomPassword(int length)
     
    boolean
    verify(String str, String hash)
    Verify string passed is matches given hash
  • Method Details

    • 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)