fr.xephi.authme.security.crypts
Interface EncryptionMethod

All Known Implementing Classes:
BCRYPT, CRAZYCRYPT1, CryptPBKDF2, DOUBLEMD5, IPB3, JOOMLA, MD5, MD5VB, MYBB, PHPBB, PHPFUSION, PLAINTEXT, ROYALAUTH, SALTED2MD5, SHA1, SHA256, SHA512, SMF, WBB3, WBB4, WHIRLPOOL, WORDPRESS, XAUTH, XF

public interface EncryptionMethod

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)


Method Summary
 boolean comparePassword(java.lang.String hash, java.lang.String password, java.lang.String playerName)
           
 java.lang.String getHash(java.lang.String password, java.lang.String salt, java.lang.String name)
           
 

Method Detail

getHash

java.lang.String getHash(java.lang.String password,
                         java.lang.String salt,
                         java.lang.String name)
                         throws java.security.NoSuchAlgorithmException
Parameters:
password -
salt - (can be an other data like playerName;salt , playerName, etc... for customs methods)
Returns:
Hashing password
Throws:
java.security.NoSuchAlgorithmException

comparePassword

boolean comparePassword(java.lang.String hash,
                        java.lang.String password,
                        java.lang.String playerName)
                        throws java.security.NoSuchAlgorithmException
Parameters:
hash -
password -
playerName -
Returns:
true if password match, false else
Throws:
java.security.NoSuchAlgorithmException