Class TOTP


  • public final class TOTP
    extends Object
    Class which represents a Time-based One-time Password as per RFC 6238.

    Refer to TOTPBuilder on how to generate a TOTP.

    See Also:
    RFC 6238
    • Method Detail

      • value

        public String value()
        Returns the time-based one time password value.
        Returns:
        the time-based one time password value.
      • time

        public long time()
        Returns the time (in milliseconds) used to generate this TOTP.
        Returns:
        the time (in milliseconds) used to generate this TOTP.
      • digits

        public int digits()
        Returns the number of digits of this TOTP.
        Returns:
        the number of digits of this TOTP.
      • timeStep

        public long timeStep()
        Returns the time step size (in milliseconds) used to generate this TOTP.
        Returns:
        the time step size (in milliseconds) used to generate this TOTP.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object