CrOTP::TOTP
Inherits CrOTP::OTP / Reference / Object
Constants
ALLOWED_ALGORITHMS = [OpenSSL::Algorithm::SHA1, OpenSSL::Algorithm::SHA256, OpenSSL::Algorithm::SHA512]
PERIOD = 30
Constructors
new(secret : String, digits : Int = 6, algorithm : OpenSSL::Algorithm = OpenSSL::Algorithm::SHA1)
SourceInstance methods
authenticator_uri(issuer : String, user : String) : String
Sourceauthenticator_uri(issuer : String) : String
Sourcegenerate(at : Int = Time.utc.to_unix) : String
Sourcegenerate(at : Time) : String
Sourceverify(token : String, at : Int = Time.utc.to_unix, allowed_drift : Int = 0) : Bool
Sourceverify(token : String, at : Time, allowed_drift : Int = 0) : Bool
Source