Class QrData

java.lang.Object
com.iizix.totp.QrData

public class QrData extends Object
The data of an enrolment QR code: the otpauth://totp/ URI parameters. Immutable; a verifier built from its algorithm, digits and period always matches what the authenticator app was enrolled with.
  • Method Details

    • getType

      public String getType()
      Returns:
      The type, always "totp".
    • getLabel

      public String getLabel()
      Returns:
      The label, generally the account name.
    • getSecret

      public String getSecret()
      Returns:
      The Base32 shared secret.
    • getIssuer

      public String getIssuer()
      Returns:
      The issuer, generally the application name.
    • getAlgorithm

      public String getAlgorithm()
      Returns:
      The friendly name of the hashing algorithm, see HashingAlgorithm.getFriendlyName().
    • getDigits

      public int getDigits()
      Returns:
      The number of digits of a code.
    • getPeriod

      public int getPeriod()
      Returns:
      The time period in seconds.
    • getUri

      public String getUri()
      Returns:
      The URI/message to encode into the QR image, in the format specified here: https://github.com/google/google-authenticator/wiki/Key-Uri-Format A space in the label is %20, never +: the label is the path of the URI, where a plus sign is a plus sign, and the authenticator apps show it as one (CC-FIX-SIGNIN-TOTP-ENROL, UX-D-16).