Interface ICrypt
-
- All Known Implementing Classes:
SCryptImplementation
public interface ICryptInterface for Encryption-Class see: https://openmeetings.apache.org/CustomCryptMechanism.html see: https://crackstation.net/hashing-security.htm- Author:
- sebastianwagner, solomax
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanfallback(String str, String hash)Verify string passed is matches given hash (using fallback crypt mechanism)Stringhash(String str)Creates hash of given stringStringrandomPassword(int length)booleanverify(String str, String hash)Verify string passed is matches given hash
-
-
-
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 forhash- - hash to compare- Returns:
truein case string matches hash,falseotherwise
-
fallback
boolean fallback(String str, String hash)
Verify string passed is matches given hash (using fallback crypt mechanism)- Parameters:
str- - string to check hash forhash- - hash to compare- Returns:
truein case string matches hash,falseotherwise
-
randomPassword
String randomPassword(int length)
-
-