Sha256: e81b49155ab9cb40e2f881c0dd4b5290b62e2b08ab7420c7403112eb72e4ab10
Contents?: true
Size: 544 Bytes
Versions: 29
Compression:
Stored size: 544 Bytes
Contents
# typed: true # Copyright (c) 2015 Sqreen. All Rights Reserved. # Please refer to our terms for more information: https://www.sqreen.com/terms.html require 'openssl' ## Rules signature module Sqreen # Perform an EC + digest verification of a message. class SignatureVerifier def initialize(key, digest) @pub_key = OpenSSL::PKey.read(key) @digest = digest end def verify(sig, val) hashed_val = @digest.digest(val) @pub_key.dsa_verify_asn1(hashed_val, sig) end end end
Version data entries
29 entries across 29 versions & 1 rubygems