Class: Linzer::Ed25519::Key

Inherits:
Key
  • Object
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

#private?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/linzer/ed25519.rb', line 20

def private?
  has_pem_private?
end

#public?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/linzer/ed25519.rb', line 16

def public?
  has_pem_public?
end

#sign(data) ⇒ Object



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

def sign(data)
  validate_signing_key
  material.sign(nil, data)
end

#verify(signature, data) ⇒ Object



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

def verify(signature, data)
  validate_verify_key
  material.verify(nil, signature, data)
end