Reformatted code with new code style

This commit is contained in:
Tim Visée
2015-11-23 21:46:34 +01:00
parent b2db25d16c
commit 36c50c4507
92 changed files with 2458 additions and 2080 deletions
@@ -92,6 +92,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param d the byte array to encode
* @param len the number of bytes to encode
*
* @return base64-encoded string * @throws IllegalArgumentException if the length is invalid * @throws IllegalArgumentException
*/
private static String encode_base64(byte d[], int len)
@@ -132,6 +133,7 @@ public class BCRYPT implements EncryptionMethod {
* range-checking againt conversion table
*
* @param x the base64-encoded value
*
* @return the decoded value of x
*/
private static byte char64(char x) {
@@ -147,6 +149,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param s the string to decode
* @param maxolen the maximum number of bytes to decode
*
* @return an array containing the decoded bytes * @throws IllegalArgumentException if maxolen is invalid * @throws IllegalArgumentException
*/
private static byte[] decode_base64(String s, int maxolen)
@@ -196,6 +199,7 @@ public class BCRYPT implements EncryptionMethod {
* @param data the string to extract the data from
* @param offp a "pointer" (as a one-entry array) to the current offset into
* data
*
* @return the next word of material from data
*/
private static int streamtoword(byte data[], int offp[]) {
@@ -217,6 +221,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param password the password to hash
* @param salt the salt to hash with (perhaps generated using BCrypt.gensalt)
*
* @return the hashed password
*/
public static String hashpw(String password, String salt) {
@@ -274,6 +279,7 @@ public class BCRYPT implements EncryptionMethod {
* @param log_rounds the log2 of the number of rounds of hashing to apply - the
* work factor therefore increases as 2**log_rounds.
* @param random an instance of SecureRandom to use
*
* @return an encoded salt value
*/
public static String gensalt(int log_rounds, SecureRandom random) {
@@ -296,6 +302,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param log_rounds the log2 of the number of rounds of hashing to apply - the
* work factor therefore increases as 2**log_rounds.
*
* @return an encoded salt value
*/
public static String gensalt(int log_rounds) {
@@ -317,6 +324,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param plaintext the plaintext password to verify
* @param hashed the previously-hashed password
*
* @return true if the passwords match, false otherwise
*/
public static boolean checkpw(String plaintext, String hashed) {
@@ -330,6 +338,7 @@ public class BCRYPT implements EncryptionMethod {
* @param text plaintext or hashed text
* @param hashed the previously-hashed password
* @param rounds number of rounds to hash the password
*
* @return boolean
*/
public static boolean checkpw(String text, String hashed, int rounds) {
@@ -355,6 +364,7 @@ public class BCRYPT implements EncryptionMethod {
*
* @param text String
* @param salt String
*
* @return String
*/
public static String getDoubleHash(String text, String salt) {
@@ -467,6 +477,7 @@ public class BCRYPT implements EncryptionMethod {
* @param salt the binary salt to hash with the password
* @param log_rounds the binary logarithm of the number of rounds of hashing to
* apply
*
* @return an array containing the binary hashed password
*/
private byte[] crypt_raw(byte password[], byte salt[], int log_rounds) {
@@ -509,6 +520,7 @@ public class BCRYPT implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -523,6 +535,7 @@ public class BCRYPT implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class BCRYPT2Y implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -28,6 +29,7 @@ public class BCRYPT2Y implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -32,6 +32,7 @@ public class CRAZYCRYPT1 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -15,6 +15,7 @@ public class CryptPBKDF2 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -33,6 +34,7 @@ public class CryptPBKDF2 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -16,6 +16,7 @@ public class CryptPBKDF2Django implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -34,6 +35,7 @@ public class CryptPBKDF2Django implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class DOUBLEMD5 implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@@ -29,6 +30,7 @@ public class DOUBLEMD5 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -43,6 +45,7 @@ public class DOUBLEMD5 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -24,6 +24,7 @@ public interface EncryptionMethod {
* @param salt (can be an other data like playerName;salt , playerName,
* etc... for customs methods)
* @param name String
*
* @return Hashing password * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/
String getHash(String password, String salt, String name)
@@ -33,6 +34,7 @@ public interface EncryptionMethod {
* @param hash
* @param password
* @param playerName
*
* @return true if password match, false else * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/
boolean comparePassword(String hash, String password, String playerName)
@@ -14,6 +14,7 @@ public class IPB3 implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@@ -31,6 +32,7 @@ public class IPB3 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -45,6 +47,7 @@ public class IPB3 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class JOOMLA implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@@ -29,6 +30,7 @@ public class JOOMLA implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -43,6 +45,7 @@ public class JOOMLA implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class MD5 implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@@ -29,6 +30,7 @@ public class MD5 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -43,6 +45,7 @@ public class MD5 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class MD5VB implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@@ -29,6 +30,7 @@ public class MD5VB implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -43,6 +45,7 @@ public class MD5VB implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -14,6 +14,7 @@ public class MYBB implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@@ -31,6 +32,7 @@ public class MYBB implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -45,6 +47,7 @@ public class MYBB implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -21,6 +21,7 @@ public class PHPBB implements EncryptionMethod {
* Method md5.
*
* @param data String
*
* @return String
*/
public static String md5(String data) {
@@ -38,6 +39,7 @@ public class PHPBB implements EncryptionMethod {
* Method hexToInt.
*
* @param ch char
*
* @return int
*/
static int hexToInt(char ch) {
@@ -53,6 +55,7 @@ public class PHPBB implements EncryptionMethod {
* Method bytes2hex.
*
* @param bytes byte[]
*
* @return String
*/
private static String bytes2hex(byte[] bytes) {
@@ -70,6 +73,7 @@ public class PHPBB implements EncryptionMethod {
* Method pack.
*
* @param hex String
*
* @return String
*/
static String pack(String hex) {
@@ -88,6 +92,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param password String
* @param salt String
*
* @return String
*/
public String phpbb_hash(String password, String salt) {
@@ -110,6 +115,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param input String
* @param itoa64 String
*
* @return String
*/
private String _hash_gensalt_private(String input, String itoa64) {
@@ -122,6 +128,7 @@ public class PHPBB implements EncryptionMethod {
* @param input String
* @param itoa64 String
* @param iteration_count_log2 int
*
* @return String
*/
private String _hash_gensalt_private(String input, String itoa64,
@@ -140,6 +147,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param input String
* @param count int
*
* @return String
*/
private String _hash_encode64(String input, int count) {
@@ -168,6 +176,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param password String
* @param setting String
*
* @return String
*/
String _hash_crypt_private(String password, String setting) {
@@ -196,6 +205,7 @@ public class PHPBB implements EncryptionMethod {
*
* @param password String
* @param hash String
*
* @return boolean
*/
public boolean phpbb_check_hash(String password, String hash) {
@@ -210,6 +220,7 @@ public class PHPBB implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -224,6 +235,7 @@ public class PHPBB implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -18,6 +18,7 @@ public class PHPFUSION implements EncryptionMethod {
* Method getSHA1.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA1(String message)
@@ -35,6 +36,7 @@ public class PHPFUSION implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -70,6 +72,7 @@ public class PHPFUSION implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class PLAINTEXT implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -26,6 +27,7 @@ public class PLAINTEXT implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -13,6 +13,7 @@ public class ROYALAUTH implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -28,6 +29,7 @@ public class ROYALAUTH implements EncryptionMethod {
*
* @param password String
* @param salt String
*
* @return String * @throws NoSuchAlgorithmException
*/
public String hash(String password, String salt)
@@ -47,6 +49,7 @@ public class ROYALAUTH implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -14,6 +14,7 @@ public class SALTED2MD5 implements EncryptionMethod {
* Method getMD5.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getMD5(String message)
@@ -31,6 +32,7 @@ public class SALTED2MD5 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -45,6 +47,7 @@ public class SALTED2MD5 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -14,6 +14,7 @@ public class SALTEDSHA512 implements EncryptionMethod {
* Method getSHA512.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA512(String message)
@@ -31,6 +32,7 @@ public class SALTEDSHA512 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -45,6 +47,7 @@ public class SALTEDSHA512 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class SHA1 implements EncryptionMethod {
* Method getSHA1.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA1(String message)
@@ -29,6 +30,7 @@ public class SHA1 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -43,6 +45,7 @@ public class SHA1 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class SHA256 implements EncryptionMethod {
* Method getSHA256.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA256(String message)
@@ -29,6 +30,7 @@ public class SHA256 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -43,6 +45,7 @@ public class SHA256 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class SHA512 implements EncryptionMethod {
* Method getSHA512.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA512(String message)
@@ -29,6 +30,7 @@ public class SHA512 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -43,6 +45,7 @@ public class SHA512 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class SMF implements EncryptionMethod {
* Method getSHA1.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA1(String message)
@@ -29,6 +30,7 @@ public class SMF implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -43,6 +45,7 @@ public class SMF implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -14,6 +14,7 @@ public class WBB3 implements EncryptionMethod {
* Method getSHA1.
*
* @param message String
*
* @return String * @throws NoSuchAlgorithmException
*/
private static String getSHA1(String message)
@@ -31,6 +32,7 @@ public class WBB3 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -45,6 +47,7 @@ public class WBB3 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -12,6 +12,7 @@ public class WBB4 implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -26,6 +27,7 @@ public class WBB4 implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -168,6 +168,7 @@ public class WHIRLPOOL implements EncryptionMethod {
* Method display.
*
* @param array byte[]
*
* @return String
*/
protected static String display(byte[] array) {
@@ -395,6 +396,7 @@ public class WHIRLPOOL implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -413,6 +415,7 @@ public class WHIRLPOOL implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -18,6 +18,7 @@ public class WORDPRESS implements EncryptionMethod {
*
* @param src byte[]
* @param count int
*
* @return String
*/
private String encode64(byte[] src, int count) {
@@ -59,6 +60,7 @@ public class WORDPRESS implements EncryptionMethod {
*
* @param password String
* @param setting String
*
* @return String
*/
private String crypt(String password, String setting) {
@@ -103,6 +105,7 @@ public class WORDPRESS implements EncryptionMethod {
* Method gensaltPrivate.
*
* @param input byte[]
*
* @return String
*/
private String gensaltPrivate(byte[] input) {
@@ -117,6 +120,7 @@ public class WORDPRESS implements EncryptionMethod {
* Method stringToUtf8.
*
* @param string String
*
* @return byte[]
*/
private byte[] stringToUtf8(String string) {
@@ -133,6 +137,7 @@ public class WORDPRESS implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -149,6 +154,7 @@ public class WORDPRESS implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -10,6 +10,7 @@ public class XAUTH implements EncryptionMethod {
* Method getWhirlpool.
*
* @param message String
*
* @return String
*/
public static String getWhirlpool(String message) {
@@ -27,6 +28,7 @@ public class XAUTH implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -43,6 +45,7 @@ public class XAUTH implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -19,6 +19,7 @@ public class XF implements EncryptionMethod {
* @param password String
* @param salt String
* @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/
@Override
@@ -33,6 +34,7 @@ public class XF implements EncryptionMethod {
* @param hash String
* @param password String
* @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/
@Override
@@ -46,6 +48,7 @@ public class XF implements EncryptionMethod {
* Method getSHA256.
*
* @param password String
*
* @return String * @throws NoSuchAlgorithmException
*/
public String getSHA256(String password) throws NoSuchAlgorithmException {
@@ -72,6 +75,7 @@ public class XF implements EncryptionMethod {
*
* @param pattern String
* @param line String
*
* @return String
*/
public String regmatch(String pattern, String line) {