Class: Altcha::V2::CreateChallengeOptions

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

Overview

Options for V2.create_challenge.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(algorithm:, cost:, counter: nil, data: nil, expires_at: nil, hmac_signature_secret: nil, hmac_key_signature_secret: nil, key_length: nil, key_prefix: nil, key_prefix_length: nil, memory_cost: nil, parallelism: nil) ⇒ CreateChallengeOptions

Returns a new instance of CreateChallengeOptions.



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/altcha/v2.rb', line 230

def initialize(algorithm:, cost:, counter: nil, data: nil,
               expires_at: nil, hmac_signature_secret: nil,
               hmac_key_signature_secret: nil, key_length: nil, key_prefix: nil,
               key_prefix_length: nil, memory_cost: nil, parallelism: nil)
  @algorithm                = algorithm
  @cost                     = cost
  @counter                  = counter
  @data                     = data
  @expires_at               = expires_at
  @hmac_signature_secret    = hmac_signature_secret
  @hmac_key_signature_secret = hmac_key_signature_secret
  @key_length               = key_length
  @key_prefix               = key_prefix
  @key_prefix_length        = key_prefix_length
  @memory_cost              = memory_cost
  @parallelism              = parallelism
end

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def algorithm
  @algorithm
end

#costObject

Returns the value of attribute cost.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def cost
  @cost
end

#counterObject

Returns the value of attribute counter.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def counter
  @counter
end

#dataObject

Returns the value of attribute data.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def data
  @data
end

#expires_atObject

Returns the value of attribute expires_at.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def expires_at
  @expires_at
end

#hmac_key_signature_secretObject

Returns the value of attribute hmac_key_signature_secret.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def hmac_key_signature_secret
  @hmac_key_signature_secret
end

#hmac_signature_secretObject

Returns the value of attribute hmac_signature_secret.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def hmac_signature_secret
  @hmac_signature_secret
end

#key_lengthObject

Returns the value of attribute key_length.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def key_length
  @key_length
end

#key_prefixObject

Returns the value of attribute key_prefix.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def key_prefix
  @key_prefix
end

#key_prefix_lengthObject

Returns the value of attribute key_prefix_length.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def key_prefix_length
  @key_prefix_length
end

#memory_costObject

Returns the value of attribute memory_cost.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def memory_cost
  @memory_cost
end

#parallelismObject

Returns the value of attribute parallelism.



225
226
227
# File 'lib/altcha/v2.rb', line 225

def parallelism
  @parallelism
end