class CrOTP::TOTP

Included Modules

Defined in:

crotp/totp.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(secret : String, digits : Int = 6) #

[View source]

Instance Method Detail

def generate(at : Int = Time.now.epoch) : String #

[View source]
def generate(at : Time) : String #

[View source]
def verify(token : String, at : Int = Time.now.epoch, allowed_drift : Int = 0) : Bool #

[View source]
def verify(token : String, at : Time, allowed_drift : Int = 0) : Bool #

[View source]