class YubiOATH

Constants

AID
ALGORITHMS
TYPES

Public Class Methods

new(card) click to toggle source
# File lib/yubioath.rb, line 12
def initialize(card)
  @card = card
  Select.new(@card).call(aid: AID)
end

Public Instance Methods

calculate(name:, timestamp:) click to toggle source
# File lib/yubioath.rb, line 17
def calculate(name:, timestamp:)
  Calculate.new(@card).call(name: name, timestamp: timestamp)
end
calculate_all(timestamp:) click to toggle source
# File lib/yubioath.rb, line 21
def calculate_all(timestamp:)
  CalculateAll.new(@card).call(timestamp: timestamp)
end
delete(name:) click to toggle source
# File lib/yubioath.rb, line 25
def delete(name:)
  Delete.new(@card).call(name: name)
end
list() click to toggle source
# File lib/yubioath.rb, line 29
def list
  List.new(@card).call
end
put(name:, secret:, algorithm: :SHA256, type: :TOTP, digits: 6) click to toggle source
# File lib/yubioath.rb, line 33
def put(name:, secret:, algorithm: :SHA256, type: :TOTP, digits: 6)
  Put.new(@card).call(name: name, secret: secret, algorithm: algorithm, type: type, digits: digits)
end
reset() click to toggle source
# File lib/yubioath.rb, line 37
def reset
  Reset.new(@card).call
end