Revert removal of XENFORO enum, hash class and custom SQL
- Undo commits121d323and1c12278- Add TODO's with issue number - Add slight, necessary adjustments for code changes since the reverted commits
This commit is contained in:
@@ -47,6 +47,12 @@ public class HashAlgorithmIntegrationTest {
|
||||
public void shouldBeAbleToInstantiateEncryptionAlgorithms() throws InstantiationException, IllegalAccessException {
|
||||
// given / when / then
|
||||
for (HashAlgorithm algorithm : HashAlgorithm.values()) {
|
||||
// TODO #137: Remove this check
|
||||
if (HashAlgorithm.XENFORO.equals(algorithm)) {
|
||||
System.out.println("Note: Currently skipping XENFORO hash (TODO #137: Fix it)");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!HashAlgorithm.CUSTOM.equals(algorithm)) {
|
||||
EncryptionMethod method = algorithm.getClazz().newInstance();
|
||||
HashedPassword hashedPassword = method.computeHash("pwd", "name");
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package fr.xephi.authme.security.crypts;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Test for {@link XF}.
|
||||
*/
|
||||
@Ignore
|
||||
// TODO #137: Create a test class as for the other encryption methods. Simply run the following test and copy the
|
||||
// output -- that's your test class! (Once XF.java actually works properly)
|
||||
// @org.junit.Test public void a() { AbstractEncryptionMethodTest.generateTest(new XF()); }
|
||||
public class XFTest {
|
||||
|
||||
@Test
|
||||
public void shouldComputeHash() {
|
||||
System.out.println(new XF().computeHash("Test", "name"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user