Class: Linzer::JWS::Key
- Inherits:
-
Key
- Object
- Key
- Linzer::JWS::Key
show all
- Defined in:
- lib/linzer/jws.rb
Instance Attribute Summary
Attributes inherited from Key
#material
Instance Method Summary
collapse
Methods inherited from Key
#initialize, #key_id, #private?
Constructor Details
This class inherits a constructor from Linzer::Key
Instance Method Details
#public? ⇒ Boolean
41
42
43
|
# File 'lib/linzer/jws.rb', line 41
def public?
!!verify_key
end
|
#sign(data) ⇒ Object
29
30
31
32
33
|
# File 'lib/linzer/jws.rb', line 29
def sign(data)
validate_signing_key
algo = resolve_algorithm
algo.sign(data: data, signing_key: signing_key)
end
|
#verify(signature, data) ⇒ Object
35
36
37
38
39
|
# File 'lib/linzer/jws.rb', line 35
def verify(signature, data)
validate_verify_key
algo = resolve_algorithm
algo.verify(data: data, signature: signature, verification_key: verify_key)
end
|