Class: Linzer::Ed25519::Key
- Inherits:
-
Key
- Object
- Key
- Linzer::Ed25519::Key
- Defined in:
- lib/linzer/ed25519.rb
Overview
Ed25519 signing key implementation.
Ed25519 keys can be used for both signing (with private key) and
verification (with public key). The algorithm identifier is ed25519.
Instance Method Summary collapse
-
#sign(data) ⇒ String
Signs data using the Ed25519 private key.
-
#verify(signature, data) ⇒ Boolean
Verifies a signature using the Ed25519 public key.
Instance Method Details
#sign(data) ⇒ String
Signs data using the Ed25519 private key.
33 34 35 36 |
# File 'lib/linzer/ed25519.rb', line 33 def sign(data) validate_signing_key material.sign(nil, data) end |
#verify(signature, data) ⇒ Boolean
Verifies a signature using the Ed25519 public key.
44 45 46 47 |
# File 'lib/linzer/ed25519.rb', line 44 def verify(signature, data) validate_verify_key material.verify(nil, signature, data) end |