diff --git a/src/test/java/test/OTPTest.java b/src/test/java/test/OTPTest.java index a814ec9..cbbdf18 100644 --- a/src/test/java/test/OTPTest.java +++ b/src/test/java/test/OTPTest.java @@ -98,6 +98,20 @@ public class OTPTest { }); }); } + + @Test + public void meeemstersCrashTest() { + assertDoesNotThrow(() -> { + String secret = "s3ydtxo35tz3n3ob5dehlh76ciokhmsbbae5zusz4vm3k6wxmt6lsfvt"; + //String base32secret = Base32.encode(hexStr2Bytes(secret)); + + OTP testOTP1 = OTP.createNewOTP(OTPType.HOTP, secret, OTPAlgorithm.MD5, 12, 0, 1, true); + assertDoesNotThrow(() -> testOTP1.getPin()); + + //OTP testOTP2 = OTP.createNewOTP(OTPType.HOTP, Base32.encode(hexStr2Bytes(secret)), OTPAlgorithm.MD5, 12, 0, 1, true); + //assertDoesNotThrow(() -> testOTP2.getPin()); + }); + } private static byte[] hexStr2Bytes(String hex) { // Adding one byte to get the right conversion