Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../opt/alt/ruby32/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/digest'
[17] Fix | Delete
require_relative 'openssl/hmac'
[18] Fix | Delete
require_relative 'openssl/x509'
[19] Fix | Delete
require_relative 'openssl/ssl'
[20] Fix | Delete
require_relative 'openssl/pkcs5'
[21] Fix | Delete
require_relative 'openssl/version'
[22] Fix | Delete
[23] Fix | Delete
module OpenSSL
[24] Fix | Delete
# call-seq:
[25] Fix | Delete
# OpenSSL.secure_compare(string, string) -> boolean
[26] Fix | Delete
#
[27] Fix | Delete
# Constant time memory comparison. Inputs are hashed using SHA-256 to mask
[28] Fix | Delete
# the length of the secret. Returns +true+ if the strings are identical,
[29] Fix | Delete
# +false+ otherwise.
[30] Fix | Delete
def self.secure_compare(a, b)
[31] Fix | Delete
hashed_a = OpenSSL::Digest.digest('SHA256', a)
[32] Fix | Delete
hashed_b = OpenSSL::Digest.digest('SHA256', b)
[33] Fix | Delete
OpenSSL.fixed_length_secure_compare(hashed_a, hashed_b) && a == b
[34] Fix | Delete
end
[35] Fix | Delete
end
[36] Fix | Delete
[37] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function