Class OtpServiceAbstract
java.lang.Object
org.bardframework.flow.form.field.input.otp.time.OtpServiceAbstract
- All Implemented Interfaces:
OtpGenerator<Void>
- Direct Known Subclasses:
HotpService,TotpService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerate()abstract Stringgenerate(byte[] secret) byte[]intintprotected byte[]hmac(byte[] input, byte[] secret) isNumber()voidsetAlgorithm(String algorithm) voidsetHmacAlgorithm(String hmacAlgorithm) voidsetHmacProvider(String hmacProvider) voidsetLength(int length) voidsetRngAlgorithm(String rngAlgorithm) voidsetRngProvider(String rngProvider) voidsetSecretSize(int secretSize) abstract boolean
-
Constructor Details
-
OtpServiceAbstract
public OtpServiceAbstract()
-
-
Method Details
-
generate
-
verify
- Throws:
GeneralSecurityException
-
hmac
- Throws:
GeneralSecurityException
-
generateSecret
- Throws:
GeneralSecurityException
-
generate
- Specified by:
generatein interfaceOtpGenerator<Void>
-
isNumber
- Specified by:
isNumberin interfaceOtpGenerator<Void>
-
getAlgorithm
-
setAlgorithm
-
getHmacAlgorithm
-
setHmacAlgorithm
-
getHmacProvider
-
setHmacProvider
-
getRngAlgorithm
-
setRngAlgorithm
-
getRngProvider
-
setRngProvider
-
getLength
public int getLength()- Specified by:
getLengthin interfaceOtpGenerator<Void>
-
setLength
public void setLength(int length) -
getSecretSize
public int getSecretSize() -
setSecretSize
public void setSecretSize(int secretSize)
-