Sha256: bd6e542adca4b79c4c2bd125d6dc35e7a877725f0c0dca7c73638be82a3a1616
Contents?: true
Size: 308 Bytes
Versions: 4
Compression:
Stored size: 308 Bytes
Contents
# Helper class to simulate a user generating TOTP codes from a secret key class TotpHelper def initialize(secret_key, otp_length) @secret_key = secret_key @otp_length = otp_length end def totp_code(time = Time.now) ROTP::TOTP.new(@secret_key, digits: @otp_length).at(time, true) end end
Version data entries
4 entries across 4 versions & 1 rubygems