@Test(expected = NullPointerException.class) public void hmacShaShouldFailWhenArgumentIsNull() { new TOTPBuilder(RFC6238TestVectors.KEY_FOR_HMAC_SHA_1).hmacSha(null); }
public TOTPBuilder hmacSha(HmacShaAlgorithm algorithm) { Preconditions.checkNotNull(algorithm); this.hmacShaAlgorithm = algorithm; return this; }
TOTPBuilder { public TOTPBuilder hmacSha(HmacShaAlgorithm algorithm) { Preconditions.checkNotNull(algorithm); this.hmacShaAlgorithm = algorithm; return this; } }
TOTPBuilder { public TOTPBuilder hmacSha(HmacShaAlgorithm algorithm) { Preconditions.checkNotNull(algorithm); this.hmacShaAlgorithm = algorithm; return this; } TOTPBuilder(byte[] key); }
TOTPBuilder { public TOTPBuilder hmacSha(HmacShaAlgorithm algorithm) { Preconditions.checkNotNull(algorithm); this.hmacShaAlgorithm = algorithm; return this; } 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 TOTPBuilder hmacSha(HmacShaAlgorithm algorithm) { Preconditions.checkNotNull(algorithm); this.hmacShaAlgorithm = algorithm; return this; } 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; }