Sha256: 58c1e8ad259df7fe07e04b5d5af0e8880d040e8f578d5eb31f3dfec01d8f1e5a
Contents?: true
Size: 302 Bytes
Versions: 18
Compression:
Stored size: 302 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) end end
Version data entries
18 entries across 18 versions & 4 rubygems