Class: CryptoToolchain::Tools::DSARecoverNonceFromSignatures::Input

Inherits:
Object
  • Object
show all
Defined in:
lib/crypto_toolchain/tools/dsa_recover_nonce_from_signatures.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(r:, s:, message:) ⇒ Input

Returns a new instance of Input.



7
8
9
10
11
12
# File 'lib/crypto_toolchain/tools/dsa_recover_nonce_from_signatures.rb', line 7

def initialize(r: , s: , message: )
  @r = r.to_i
  @s = s.to_i
  @message = message
  @hash = CryptoToolchain::Utilities::SHA1.hexdigest(message)
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



13
14
15
# File 'lib/crypto_toolchain/tools/dsa_recover_nonce_from_signatures.rb', line 13

def hash
  @hash
end

#messageObject (readonly)

Returns the value of attribute message.



13
14
15
# File 'lib/crypto_toolchain/tools/dsa_recover_nonce_from_signatures.rb', line 13

def message
  @message
end

#rObject (readonly)

Returns the value of attribute r.



13
14
15
# File 'lib/crypto_toolchain/tools/dsa_recover_nonce_from_signatures.rb', line 13

def r
  @r
end

#sObject (readonly)

Returns the value of attribute s.



13
14
15
# File 'lib/crypto_toolchain/tools/dsa_recover_nonce_from_signatures.rb', line 13

def s
  @s
end