Class ROTP::OTP
In: lib/rotp/otp.rb
Parent: Object

Methods

generate_otp   new  

Constants

DEFAULT_DIGITS = 6

Attributes

digest  [R] 
digits  [R] 
secret  [R] 

Public Class methods

@param [String] secret in the form of base32 @option options digits [Integer] (6)

    Number of integers in the OTP.
    Google Authenticate only supports 6 currently

@option options digest [String] (sha1)

    Digest used in the HMAC.
    Google Authenticate only supports 'sha1' currently

@returns [OTP] OTP instantiation

Public Instance methods

@param [Integer] input the number used seed the HMAC @option padded [Boolean] (false) Output the otp as a 0 padded string Usually either the counter, or the computed integer based on the Unix timestamp

[Validate]