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 TypeMethodDescriptionboolean
Verify string passed is matches given hash (using fallback crypt mechanism)Creates hash of given stringrandomPassword
(int length) boolean
Verify string passed is matches given hash
-
Method Details
-
hash
Creates hash of given string- Parameters:
str
- - string to calculate hash for- Returns:
- hash of passed string
-
verify
Verify string passed is matches given hash- Parameters:
str
- - string to check hash forhash
- - hash to compare- Returns:
true
in case string matches hash,false
otherwise
-
fallback
Verify string passed is matches given hash (using fallback crypt mechanism)- Parameters:
str
- - string to check hash forhash
- - hash to compare- Returns:
true
in case string matches hash,false
otherwise
-
randomPassword
-