Class: Linzer::Ed25519::Key
- Inherits:
-
Key
- Object
- Key
- Linzer::Ed25519::Key
show all
- Defined in:
- lib/linzer/ed25519.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
8
9
10
|
# File 'lib/linzer/ed25519.rb', line 8
def sign(data)
material.sign(data)
end
|
#verify(signature, data) ⇒ Object
12
13
14
15
16
17
|
# File 'lib/linzer/ed25519.rb', line 12
def verify(signature, data)
verify_key = material.is_a?(::Ed25519::SigningKey) ? material.verify_key : material
verify_key.verify(signature, data)
rescue ::Ed25519::VerifyError
false
end
|