Class GoogleAuthenticatorKey

java.lang.Object
com.warrenstrange.googleauth.GoogleAuthenticatorKey

public final class GoogleAuthenticatorKey
extends Object
This class is a JavaBean used by the GoogleAuthenticator library to represent a secret key.

This class is immutable.

Instance of this class should only be constructed by the GoogleAuthenticator library.

Since:
1.0.0
Version:
1.1.4
Author:
Enrico M. Crisostomo
See Also:
GoogleAuthenticator
  • Method Details

    • getScratchCodes

      public List<Integer> getScratchCodes()
      Get the list of scratch codes.
      Returns:
      the list of scratch codes.
    • getConfig

      public GoogleAuthenticatorConfig getConfig()
      Get the config of this key.
      Returns:
      the config of this key.
    • getKey

      public String getKey()
      Returns the secret key in Base32 encoding.
      Returns:
      the secret key in Base32 encoding.
    • getVerificationCode

      public int getVerificationCode()
      Returns the verification code at time = 0 (the UNIX epoch).
      Returns:
      the verificationCode at time = 0 (the UNIX epoch).