Class: Altcha::ChallengeOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/altcha.rb

Overview

Class representing options for generating a challenge.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(algorithm: nil, max_number: nil, salt_length: nil, hmac_key:, salt: nil, number: nil, expires: nil, params: nil) ⇒ ChallengeOptions

Returns a new instance of ChallengeOptions.



27
28
29
30
31
32
33
34
35
36
# File 'lib/altcha.rb', line 27

def initialize(algorithm: nil, max_number: nil, salt_length: nil, hmac_key:, salt: nil, number: nil, expires: nil, params: nil)
  @algorithm = algorithm
  @max_number = max_number
  @salt_length = salt_length
  @hmac_key = hmac_key
  @salt = salt
  @number = number
  @expires = expires
  @params = params
end

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm.



25
26
27
# File 'lib/altcha.rb', line 25

def algorithm
  @algorithm
end

#expiresObject

Returns the value of attribute expires.



25
26
27
# File 'lib/altcha.rb', line 25

def expires
  @expires
end

#hmac_keyObject

Returns the value of attribute hmac_key.



25
26
27
# File 'lib/altcha.rb', line 25

def hmac_key
  @hmac_key
end

#max_numberObject

Returns the value of attribute max_number.



25
26
27
# File 'lib/altcha.rb', line 25

def max_number
  @max_number
end

#numberObject

Returns the value of attribute number.



25
26
27
# File 'lib/altcha.rb', line 25

def number
  @number
end

#paramsObject

Returns the value of attribute params.



25
26
27
# File 'lib/altcha.rb', line 25

def params
  @params
end

#saltObject

Returns the value of attribute salt.



25
26
27
# File 'lib/altcha.rb', line 25

def salt
  @salt
end

#salt_lengthObject

Returns the value of attribute salt_length.



25
26
27
# File 'lib/altcha.rb', line 25

def salt_length
  @salt_length
end