public class GoogleAuthenticatorConfig extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder |
| 构造器和说明 |
|---|
GoogleAuthenticatorConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
static GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder |
builder() |
int |
getCodeDigits()
Returns the number of digits in the generated code.
|
OtpHmacHashAlgorithm |
getHmacHash()
Returns the cryptographic hash function used to calculate the HMAC (Hash-based
Message Authentication Code).
|
int |
getKeyModulus()
Returns the key module.
|
int |
getNumberOfScratchCodes()
Returns the number of scratch codes to generate.
|
int |
getSecretBits()
Returns the number of bits of the secret keys to generate.
|
long |
getTimeStepSizeInMillis()
Returns the time step size, in milliseconds, as specified by RFC 6238.
|
int |
getWindowSize()
Returns an integer value representing the number of windows of size
timeStepSizeInMillis that are checked during the validation process,
to account for differences between the server and the client clocks.
|
public int getKeyModulus()
public int getCodeDigits()
public int getNumberOfScratchCodes()
public long getTimeStepSizeInMillis()
public int getWindowSize()
We are using Google's default behaviour of using a window size equal to 3. The limit on the maximum window size, present in older versions of this library, has been removed.
timeStepSizeInMillispublic int getSecretBits()
public OtpHmacHashAlgorithm getHmacHash()
public static GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder builder()
Copyright © 2024 fossc. All rights reserved.