module

Patty::Security::TOTP

Constants

ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
DIGITS = 6
PERIOD = 30_i64
SECRET_BYTES = 20

Instance methods

base32_decode(value : String) : Bytes
Source
base32_encode(bytes : Bytes) : String
Source
code(secret : Bytes, at : Time = Time.utc, digits : Int32 = DIGITS) : String
Source
generate_secret
Source
matching_step(secret : Bytes, submitted : String, at : Time = Time.utc, last_step : Int64 = -1_i64, window : Int32 = 1) : Int64 | Nil
Source
provisioning_uri(secret : String, account : String = "admin") : String
Source