mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-10-06 02:17:42 +02:00
Add new hash method (#1446)
Add new hash method for a CMS : http://craftmywebsite.fr/
This commit is contained in:
parent
8f4171c436
commit
2d77f54695
@ -10,6 +10,7 @@ public enum HashAlgorithm {
|
|||||||
ARGON2(fr.xephi.authme.security.crypts.Argon2.class),
|
ARGON2(fr.xephi.authme.security.crypts.Argon2.class),
|
||||||
BCRYPT(fr.xephi.authme.security.crypts.BCrypt.class),
|
BCRYPT(fr.xephi.authme.security.crypts.BCrypt.class),
|
||||||
BCRYPT2Y(fr.xephi.authme.security.crypts.BCrypt2y.class),
|
BCRYPT2Y(fr.xephi.authme.security.crypts.BCrypt2y.class),
|
||||||
|
CMW(fr.xephi.authme.security.crypts.CmwCrypt.class),
|
||||||
CRAZYCRYPT1(fr.xephi.authme.security.crypts.CrazyCrypt1.class),
|
CRAZYCRYPT1(fr.xephi.authme.security.crypts.CrazyCrypt1.class),
|
||||||
IPB3(fr.xephi.authme.security.crypts.Ipb3.class),
|
IPB3(fr.xephi.authme.security.crypts.Ipb3.class),
|
||||||
IPB4(fr.xephi.authme.security.crypts.Ipb4.class),
|
IPB4(fr.xephi.authme.security.crypts.Ipb4.class),
|
||||||
|
14
src/main/java/fr/xephi/authme/security/crypts/CmwCrypt.java
Normal file
14
src/main/java/fr/xephi/authme/security/crypts/CmwCrypt.java
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package fr.xephi.authme.security.crypts;
|
||||||
|
|
||||||
|
import fr.xephi.authme.security.HashUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hash algorithm to hook into the CMS <a href="http://craftmywebsite.fr/">Craft My Website</a>.
|
||||||
|
*/
|
||||||
|
public class CmwCrypt extends UnsaltedMethod {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String computeHash(String password) {
|
||||||
|
return HashUtils.md5(HashUtils.sha1(password));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package fr.xephi.authme.security.crypts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test for {@link CmwCrypt}.
|
||||||
|
*/
|
||||||
|
public class CmwCryptTest extends AbstractEncryptionMethodTest {
|
||||||
|
|
||||||
|
public CmwCryptTest() {
|
||||||
|
super(new CmwCrypt(),
|
||||||
|
"1619d7adc23f4f633f11014d2f22b7d8", // password
|
||||||
|
"c651798d2d9da38f86654107ae60c86a", // PassWord1
|
||||||
|
"1fff869a744700cdb623a403c46e93ea", // &^%te$t?Pw@_
|
||||||
|
"6436230e0effff37af79302147319dda"); // âË_3(íù*
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user