class Acme::Client::JWK::HMAC
Public Class Methods
Public Instance Methods
Source
# File lib/acme/client/jwk/hmac.rb, line 25 def jwa_alg # https://tools.ietf.org/html/rfc7518#section-3.1 # HMAC using SHA-256 'HS256' end
The name of the algorithm as needed for the ‘alg` member of a JWS object.
Returns a String.
Source
# File lib/acme/client/jwk/hmac.rb, line 18 def sign(message) OpenSSL::HMAC.digest('SHA256', @key, message) end
Sign a message with the private key.
message - A String message to sign.
Returns a String signature.