package fr.xephi.authme.security.crypts; import java.security.NoSuchAlgorithmException; /** *

* Public interface for Custom Password encryption method *

*

* The getHash function is called when we need to crypt the password (/register * usually) *

*

* The comparePassword is called when we need to match password (/login usually) *

*/ public interface EncryptionMethod { /** * @param hash * @param password * @param playerName * @return true if password match, false else * @throws NoSuchAlgorithmException */ boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException; /** * @param password * @param salt * (can be an other data like playerName;salt , playerName, * etc... for customs methods) * @return Hashing password * @throws NoSuchAlgorithmException */ String getHash(String password, String salt, String name) throws NoSuchAlgorithmException; }