module Signed::Signature
handles openssl hashing part
openssl verify and sign
Public Instance Methods
sign_with(algo, data)
click to toggle source
# File lib/signed/signature.rb, line 10 def sign_with(algo, data) OpenSSL::Digest.hexdigest(algo, data) end
verify_hash(algo, signature, data)
click to toggle source
# File lib/signed/signature.rb, line 14 def verify_hash(algo, signature, data) hash = OpenSSL::Digest.hexdigest(algo, data) hash == signature end