Package com.bastiaanjansen.otp
Class HOTPGenerator.Builder
- java.lang.Object
-
- com.bastiaanjansen.otp.HOTPGenerator.Builder
-
- Enclosing class:
- HOTPGenerator
public static final class HOTPGenerator.Builder extends Object
- Author:
- Bastiaan Jansen
- See Also:
HOTPGenerator
-
-
Constructor Summary
Constructors Constructor Description Builder(byte[] secret)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HOTPGeneratorbuild()Build the generator with specified optionsHOTPGenerator.BuilderwithAlgorithm(HMACAlgorithm algorithm)Change hashing algorithmHOTPGenerator.BuilderwithPasswordLength(int passwordLength)
-
-
-
Method Detail
-
withPasswordLength
public HOTPGenerator.Builder withPasswordLength(int passwordLength)
-
withAlgorithm
public HOTPGenerator.Builder withAlgorithm(HMACAlgorithm algorithm)
Change hashing algorithm- Parameters:
algorithm- HMAC hashing algorithm- Returns:
- concrete builder
-
build
public HOTPGenerator build()
Build the generator with specified options- Returns:
- HOTP
-
-