ruby md5加签验签方法时间:2023-03-10 03:14:06 # md5签名def md5_sign(data,key) return OpenSSL::Digest::MD5.hexdigest(data+key)end # md5验签def md5_verify(data,sign,key) return true if sign.eql? OpenSSL::Digest::MD5.hexdigest(data+key) return falseend