Class: Linzer::ECDSA::Key

Inherits:
Key
  • Object
show all
Defined in:
lib/linzer/ecdsa.rb

Instance Attribute Summary

Attributes inherited from Key

#material

Instance Method Summary collapse

Methods inherited from Key

#initialize, #key_id

Constructor Details

This class inherits a constructor from Linzer::Key

Instance Method Details

#sign(data) ⇒ Object



11
12
13
# File 'lib/linzer/ecdsa.rb', line 11

def sign(data)
  decode_der_signature(material.sign(@params[:digest], data))
end

#validateObject



6
7
8
9
# File 'lib/linzer/ecdsa.rb', line 6

def validate
  super
  validate_digest
end

#verify(signature, data) ⇒ Object



15
16
17
# File 'lib/linzer/ecdsa.rb', line 15

def verify(signature, data)
  material.verify(@params[:digest], der_signature(signature), data)
end