Class: Net::HTTP::MessageSignatures::SignatureAlgorithm
- Inherits:
-
Object
- Object
- Net::HTTP::MessageSignatures::SignatureAlgorithm
- Defined in:
- lib/net/http/message_signatures/signature_algorithm.rb
Overview
Abstract representation of HTTP Signature Algorithms.
To instantiate this class, you must pass the key material. With that instance, both of HTTP_SIGN and HTTP_VERIFY method can be used without passing key material.
Direct Known Subclasses
Defined Under Namespace
Classes: InvalidAlgorithm
Instance Method Summary collapse
-
#sign(message) ⇒ String
HTTP_SIGN method which can be used without signing key material.
-
#verify(message, signature) ⇒ Boolean
HTTP_VERIFY method which can be used without verification key material.
Instance Method Details
#sign(message) ⇒ String
HTTP_SIGN method which can be used without signing key material
19 20 21 22 23 |
# File 'lib/net/http/message_signatures/signature_algorithm.rb', line 19 def sign() # :nocov: raise NotImplementedError, 'signature algorithm must implement #sign' # :nocov: end |
#verify(message, signature) ⇒ Boolean
HTTP_VERIFY method which can be used without verification key material
30 31 32 33 34 |
# File 'lib/net/http/message_signatures/signature_algorithm.rb', line 30 def verify(, signature) # :nocov: raise NotImplementedError, 'signature algorithm must implement #verify' # :nocov: end |