Class: ROTP::HOTP
Instance Method Summary (collapse)
- - (Object) at(count)
- 
  
    
      - (String) provisioning_uri(name, start_count = 0) 
    
    
  
  
  
  
  
  
  
  
    Returns the provisioning URI for the OTP This can then be encoded in a QR Code and used to provision the Google Authenticator app. 
Methods inherited from OTP
#byte_secret, #generate_otp, #initialize, #int_to_bytestring
Constructor Details
This class inherits a constructor from ROTP::OTP
Instance Method Details
- (Object) at(count)
| 3 4 5 | # File 'lib/rotp/hotp.rb', line 3 def at(count) generate_otp(count) end | 
- (String) provisioning_uri(name, start_count = 0)
Returns the provisioning URI for the OTP This can then be encoded in a QR Code and used to provision the Google Authenticator app
| 13 14 15 | # File 'lib/rotp/hotp.rb', line 13 def provisioning_uri(name, start_count=0) "otpauth://hotp/#{URI.encode(name)}?secret=#{secret}&counter=#{start_count}" end |