@Test(expected = IllegalArgumentException.class) public void buildShouldFailWhenTimeArgumentIsLessThanZero() { new TOTPBuilder(RFC6238TestVectors.KEY_FOR_HMAC_SHA_1).build(-1L); }
public TOTP build() { long time = System.currentTimeMillis(); return new TOTP(generateTOTP(time), time, hmacShaAlgorithm, digits, timeStep); }
TOTPBuilder { public TOTP build() { long time = System.currentTimeMillis(); return new TOTP(generateTOTP(time), time, hmacShaAlgorithm, digits, timeStep); } }
TOTPBuilder { public TOTP build() { long time = System.currentTimeMillis(); return new TOTP(generateTOTP(time), time, hmacShaAlgorithm, digits, timeStep); } TOTPBuilder(byte[] key); }
TOTPBuilder { public TOTP build() { long time = System.currentTimeMillis(); return new TOTP(generateTOTP(time), time, hmacShaAlgorithm, digits, timeStep); } TOTPBuilder(byte[] key); TOTPBuilder timeStep(long timeStep); TOTPBuilder digits(int digits); TOTPBuilder hmacSha(HmacShaAlgorithm algorithm); TOTPBuilder hmacSha1(); TOTPBuilder hmacSha256(); TOTPBuilder hmacSha512(); TOTP build(); TOTP build(long time); }
TOTPBuilder { public TOTP build() { long time = System.currentTimeMillis(); return new TOTP(generateTOTP(time), time, hmacShaAlgorithm, digits, timeStep); } TOTPBuilder(byte[] key); TOTPBuilder timeStep(long timeStep); TOTPBuilder digits(int digits); TOTPBuilder hmacSha(HmacShaAlgorithm algorithm); TOTPBuilder hmacSha1(); TOTPBuilder hmacSha256(); TOTPBuilder hmacSha512(); TOTP build(); TOTP build(long time); static final long DEFAULT_TIME_STEP; static final int DEFAULT_DIGITS; static final int MIN_ALLOWED_DIGITS; static final int MAX_ALLOWED_DIGITS; }