Compare commits

..

No commits in common. "55cdd506fb7bb071ad242d8210f2f9dddce3ae41" and "66c7e455974e7310300db0c2d0876566d4377df5" have entirely different histories.

3 changed files with 3 additions and 26 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.cringe_studios</groupId>
<artifactId>CringeAuthenticatorLibrary</artifactId>
<version>1.5</version>
<version>1.4</version>
<name>CringeAuthenticatorLibrary</name>
<description>The Library of the Cringe Authenticator</description>
<build>

View File

@ -11,9 +11,7 @@ public enum OTPAlgorithm{
SHA224("HmacSHA224"),
SHA256("HmacSHA256"),
SHA384("HmacSHA384"),
SHA512("HmacSHA512"),
MD5 ("HmacMD5");
SHA512("HmacSHA512");
private String javaName;

View File

@ -52,27 +52,6 @@ public class OTPTest {
}
}
@Test
public void md5Test() {
String secret = String.format("%x", new BigInteger(1, "MD5".getBytes()));
String base32secret = Base32.encode(hexStr2Bytes(secret));
//System.out.println("MD5 String: " + base32secret);
assertDoesNotThrow(() -> {
OTP testOTP1 = OTPType.HOTP.instance(base32secret, OTPAlgorithm.MD5, 6, 0, 30, false);
for(int i = 0; i < 5; i++) {
String calculatedPin = testOTP1.getPin();
testOTP1.incrementCounter();
if(VERBOSE) {
System.out.println("Calculated MD5 pin - counter: " + i + " pin: " + calculatedPin);
}
}
});
}
@Test
public void lengthTest() {
assertDoesNotThrow(() -> {