Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../opt/alt/ruby30/share/ruby
File: openssl.rb
# frozen_string_literal: true
[0] Fix | Delete
=begin
[1] Fix | Delete
= Info
[2] Fix | Delete
'OpenSSL for Ruby 2' project
[3] Fix | Delete
Copyright (C) 2002 Michal Rokos <m.rokos@sh.cvut.cz>
[4] Fix | Delete
All rights reserved.
[5] Fix | Delete
[6] Fix | Delete
= Licence
[7] Fix | Delete
This program is licensed under the same licence as Ruby.
[8] Fix | Delete
(See the file 'LICENCE'.)
[9] Fix | Delete
=end
[10] Fix | Delete
[11] Fix | Delete
require 'openssl.so'
[12] Fix | Delete
[13] Fix | Delete
require_relative 'openssl/bn'
[14] Fix | Delete
require_relative 'openssl/pkey'
[15] Fix | Delete
require_relative 'openssl/cipher'
[16] Fix | Delete
require_relative 'openssl/config'
[17] Fix | Delete
require_relative 'openssl/digest'
[18] Fix | Delete
require_relative 'openssl/hmac'
[19] Fix | Delete
require_relative 'openssl/x509'
[20] Fix | Delete
require_relative 'openssl/ssl'
[21] Fix | Delete
require_relative 'openssl/pkcs5'
[22] Fix | Delete
require_relative 'openssl/version'
[23] Fix | Delete
[24] Fix | Delete
module OpenSSL
[25] Fix | Delete
# call-seq:
[26] Fix | Delete
# OpenSSL.secure_compare(string, string) -> boolean
[27] Fix | Delete
#
[28] Fix | Delete
# Constant time memory comparison. Inputs are hashed using SHA-256 to mask
[29] Fix | Delete
# the length of the secret. Returns +true+ if the strings are identical,
[30] Fix | Delete
# +false+ otherwise.
[31] Fix | Delete
def self.secure_compare(a, b)
[32] Fix | Delete
hashed_a = OpenSSL::Digest.digest('SHA256', a)
[33] Fix | Delete
hashed_b = OpenSSL::Digest.digest('SHA256', b)
[34] Fix | Delete
OpenSSL.fixed_length_secure_compare(hashed_a, hashed_b) && a == b
[35] Fix | Delete
end
[36] Fix | Delete
end
[37] Fix | Delete
[38] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function