Sha256: 8852c46cbe61d7c82c074455b12d7593fb2082825e5fe4c5890ad129bba828ae
Contents?: true
Size: 712 Bytes
Versions: 5
Compression:
Stored size: 712 Bytes
Contents
# frozen_string_literal: true require "openssl" require "openssl/signature_algorithm/rsa" module OpenSSL module SignatureAlgorithm class RSAPSS < RSA def sign(data) signing_key.sign_pss(hash_function, data, salt_length: :max, mgf1_hash: mgf1_hash_function) end def verify(signature, verification_data) verify_key.verify_pss( hash_function, signature, verification_data, salt_length: :auto, mgf1_hash: mgf1_hash_function ) || raise(OpenSSL::SignatureAlgorithm::SignatureVerificationError, "Signature verification failed") end def mgf1_hash_function hash_function end end end end
Version data entries
5 entries across 5 versions & 1 rubygems