sysverify

dsa.sysverify(digest, sig) รข true | false
Instance Public methods

Verifies whether the signature is valid given the message digest input. It does so by validating sig using the public key of this DSA instance.

Parameters

  • digest is a message digest of the original input data to be signed

  • sig is a DSA signature value

Example

dsa = OpenSSL::PKey::DSA.new(2048)
doc = "Sign me"
digest = OpenSSL::Digest::SHA1.digest(doc)
sig = dsa.syssign(digest)
puts dsa.sysverify(digest, sig) # => true
doc_ruby_on_rails
2015-04-25 16:20:09
Comments
Leave a Comment

Please login to continue.