enum

KemalIdentity::MFA::TOTP::Algorithm

Inherits Enum < Comparable < Value < Object

Digest used to derive codes. SHA-1 is the default, and not because it is the best of these: it is what authenticator apps overwhelmingly implement, and a second factor nobody can enrol in protects nothing. HMAC-SHA-1 is not affected by the SHA-1 collision results — this is a keyed MAC over a counter, not a signature over attacker-chosen text.

Constants

SHA1 = 0
SHA256 = 1
SHA512 = 2

Instance methods

digest
Source
sha1?

Returns true if this enum value equals SHA1

Source
sha256?

Returns true if this enum value equals SHA256

Source
sha512?

Returns true if this enum value equals SHA512

Source
to_s(io : IO) : Nil

The spelling the otpauth:// URI uses.

Source