class CrOTP::TOTP
- CrOTP::TOTP
- Reference
- Object
Included Modules
Defined in:
crotp/totp.crConstant Summary
-
ALLOWED_ALGORITHMS =
[OpenSSL::Algorithm::SHA1, OpenSSL::Algorithm::SHA256, OpenSSL::Algorithm::SHA512]
-
PERIOD =
30
Constructors
Instance Method Summary
- #authenticator_uri(issuer : String, user : String) : String
- #authenticator_uri(issuer : String) : String
- #generate(at : Int = Time.utc.to_unix) : String
- #generate(at : Time) : String
- #verify(token : String, at : Int = Time.utc.to_unix, allowed_drift : Int = 0) : Bool
- #verify(token : String, at : Time, allowed_drift : Int = 0) : Bool
Instance methods inherited from module CrOTP::OTP
base32_secret : String
base32_secret
Constructor Detail
def self.new(secret : String, digits : Int = 6, algorithm : OpenSSL::Algorithm = OpenSSL::Algorithm::SHA1)
#