GRAYBYTE WORDPRESS FILE MANAGER6788

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/ruby30/share/ruby/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby30/share/ruby//base64.rb
# frozen_string_literal: true
#
# = base64.rb: methods for base64-encoding and -decoding strings
#

# The Base64 module provides for the encoding (#encode64, #strict_encode64,
# #urlsafe_encode64) and decoding (#decode64, #strict_decode64,
# #urlsafe_decode64) of binary data using a Base64 representation.
#
# == Example
#
# A simple encoding and decoding.
#
#     require "base64"
#
#     enc   = Base64.encode64('Send reinforcements')
#                         # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n"
#     plain = Base64.decode64(enc)
#                         # -> "Send reinforcements"
#
# The purpose of using base64 to encode data is that it translates any
# binary data into purely printable characters.

module Base64
  module_function

  # Returns the Base64-encoded version of +bin+.
  # This method complies with RFC 2045.
  # Line feeds are added to every 60 encoded characters.
  #
  #    require 'base64'
  #    Base64.encode64("Now is the time for all good coders\nto learn Ruby")
  #
  # <i>Generates:</i>
  #
  #    Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g
  #    UnVieQ==
  def encode64(bin)
    [bin].pack("m")
  end

  # Returns the Base64-decoded version of +str+.
  # This method complies with RFC 2045.
  # Characters outside the base alphabet are ignored.
  #
  #   require 'base64'
  #   str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' +
  #         'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' +
  #         'ZSB0aHJlZQpBbmQgc28gb24uLi4K'
  #   puts Base64.decode64(str)
  #
  # <i>Generates:</i>
  #
  #    This is line one
  #    This is line two
  #    This is line three
  #    And so on...
  def decode64(str)
    str.unpack1("m")
  end

  # Returns the Base64-encoded version of +bin+.
  # This method complies with RFC 4648.
  # No line feeds are added.
  def strict_encode64(bin)
    [bin].pack("m0")
  end

  # Returns the Base64-decoded version of +str+.
  # This method complies with RFC 4648.
  # ArgumentError is raised if +str+ is incorrectly padded or contains
  # non-alphabet characters.  Note that CR or LF are also rejected.
  def strict_decode64(str)
    str.unpack1("m0")
  end

  # Returns the Base64-encoded version of +bin+.
  # This method complies with ``Base 64 Encoding with URL and Filename Safe
  # Alphabet'' in RFC 4648.
  # The alphabet uses '-' instead of '+' and '_' instead of '/'.
  # Note that the result can still contain '='.
  # You can remove the padding by setting +padding+ as false.
  def urlsafe_encode64(bin, padding: true)
    str = strict_encode64(bin)
    str.tr!("+/", "-_")
    str.delete!("=") unless padding
    str
  end

  # Returns the Base64-decoded version of +str+.
  # This method complies with ``Base 64 Encoding with URL and Filename Safe
  # Alphabet'' in RFC 4648.
  # The alphabet uses '-' instead of '+' and '_' instead of '/'.
  #
  # The padding character is optional.
  # This method accepts both correctly-padded and unpadded input.
  # Note that it still rejects incorrectly-padded input.
  def urlsafe_decode64(str)
    # NOTE: RFC 4648 does say nothing about unpadded input, but says that
    # "the excess pad characters MAY also be ignored", so it is inferred that
    # unpadded input is also acceptable.
    str = str.tr("-_", "+/")
    if !str.end_with?("=") && str.length % 4 != 0
      str = str.ljust((str.length + 3) & ~3, "=")
    end
    strict_decode64(str)
  end
end

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
January 01 1970 00:00:00
root / root
0
benchmark
--
July 17 2024 08:38:23
root / linksafe
0755
bigdecimal
--
July 17 2024 08:38:27
root / linksafe
0755
cgi
--
July 17 2024 08:38:23
root / linksafe
0755
csv
--
July 17 2024 08:38:23
root / linksafe
0755
did_you_mean
--
July 17 2024 08:38:23
root / linksafe
0755
digest
--
July 17 2024 08:38:23
root / linksafe
0755
drb
--
July 17 2024 08:38:23
root / linksafe
0755
fiddle
--
July 17 2024 08:38:23
root / linksafe
0755
forwardable
--
July 17 2024 08:38:23
root / linksafe
0755
io
--
June 26 2024 13:55:13
root / linksafe
0755
json
--
July 17 2024 08:38:31
root / linksafe
0755
logger
--
July 17 2024 08:38:23
root / linksafe
0755
matrix
--
July 17 2024 08:38:23
root / linksafe
0755
net
--
July 17 2024 08:38:23
root / linksafe
0755
openssl
--
July 17 2024 08:38:23
root / linksafe
0755
optparse
--
July 17 2024 08:38:23
root / linksafe
0755
psych
--
July 17 2024 08:38:31
root / linksafe
0755
racc
--
July 17 2024 08:38:23
root / linksafe
0755
reline
--
July 17 2024 08:38:23
root / linksafe
0755
rinda
--
July 17 2024 08:38:23
root / linksafe
0755
ripper
--
July 17 2024 08:38:23
root / linksafe
0755
set
--
July 17 2024 08:38:23
root / linksafe
0755
syslog
--
July 17 2024 08:38:23
root / linksafe
0755
unicode_normalize
--
July 17 2024 08:38:23
root / linksafe
0755
uri
--
July 17 2024 08:38:23
root / linksafe
0755
vendor_ruby
--
June 26 2024 13:55:13
root / linksafe
0755
yaml
--
July 17 2024 08:38:23
root / linksafe
0755
English.rb
6.111 KB
June 26 2024 13:55:18
root / linksafe
0644
abbrev.rb
3.446 KB
June 26 2024 13:55:18
root / linksafe
0644
base64.rb
3.3 KB
June 26 2024 13:55:18
root / linksafe
0644
benchmark.rb
18.021 KB
June 26 2024 13:55:18
root / linksafe
0644
bigdecimal.rb
0.023 KB
June 26 2024 13:55:18
root / linksafe
0644
cgi.rb
9.821 KB
June 26 2024 13:55:18
root / linksafe
0644
coverage.rb
0.359 KB
June 26 2024 13:55:18
root / linksafe
0644
csv.rb
86.712 KB
June 26 2024 13:55:18
root / linksafe
0644
date.rb
1.018 KB
June 26 2024 13:55:18
root / linksafe
0644
debug.rb
30.305 KB
June 26 2024 13:55:18
root / linksafe
0644
delegate.rb
11.681 KB
June 26 2024 13:55:17
root / linksafe
0644
did_you_mean.rb
3.854 KB
June 26 2024 13:55:17
root / linksafe
0644
digest.rb
2.826 KB
June 26 2024 13:55:18
root / linksafe
0644
drb.rb
0.049 KB
June 26 2024 13:55:18
root / linksafe
0644
erb.rb
28.813 KB
June 26 2024 13:55:18
root / linksafe
0644
expect.rb
2.165 KB
June 26 2024 13:55:17
root / linksafe
0644
fiddle.rb
2.111 KB
June 26 2024 13:55:18
root / linksafe
0644
fileutils.rb
48.258 KB
June 26 2024 13:55:17
root / linksafe
0644
find.rb
2.467 KB
June 26 2024 13:55:18
root / linksafe
0644
forwardable.rb
8.976 KB
June 26 2024 13:55:17
root / linksafe
0644
getoptlong.rb
15.45 KB
June 26 2024 13:55:18
root / linksafe
0644
ipaddr.rb
19.521 KB
June 26 2024 13:55:17
root / linksafe
0644
json.rb
19.296 KB
June 26 2024 13:55:18
root / linksafe
0644
kconv.rb
5.724 KB
June 26 2024 13:55:18
root / linksafe
0644
logger.rb
16.484 KB
June 26 2024 13:55:18
root / linksafe
0644
matrix.rb
61.833 KB
June 26 2024 13:55:18
root / linksafe
0644
mkmf.rb
86.586 KB
June 26 2024 13:55:18
root / linksafe
0644
monitor.rb
6.758 KB
June 26 2024 13:55:17
root / linksafe
0644
mutex_m.rb
2.229 KB
June 26 2024 13:55:18
root / linksafe
0644
objspace.rb
2.664 KB
June 26 2024 13:55:18
root / linksafe
0644
observer.rb
6.379 KB
June 26 2024 13:55:18
root / linksafe
0644
open-uri.rb
24.736 KB
June 26 2024 13:55:18
root / linksafe
0644
open3.rb
21.93 KB
June 26 2024 13:55:18
root / linksafe
0644
openssl.rb
1.061 KB
June 26 2024 13:55:18
root / linksafe
0644
optionparser.rb
0.058 KB
June 26 2024 13:55:18
root / linksafe
0644
optparse.rb
60.336 KB
June 26 2024 13:55:17
root / linksafe
0644
ostruct.rb
12.385 KB
June 26 2024 13:55:17
root / linksafe
0644
pathname.rb
16.461 KB
June 26 2024 13:55:18
root / linksafe
0644
pp.rb
15.846 KB
June 26 2024 13:55:18
root / linksafe
0644
prettyprint.rb
15.899 KB
June 26 2024 13:55:18
root / linksafe
0644
prime.rb
15.132 KB
June 26 2024 13:55:18
root / linksafe
0644
pstore.rb
14.73 KB
June 26 2024 13:55:18
root / linksafe
0644
psych.rb
22.399 KB
June 26 2024 13:55:17
root / linksafe
0644
racc.rb
0.134 KB
June 26 2024 13:55:18
root / linksafe
0644
readline.rb
0.11 KB
June 26 2024 13:55:18
root / linksafe
0644
reline.rb
13.897 KB
June 26 2024 13:55:18
root / linksafe
0644
resolv-replace.rb
1.763 KB
June 26 2024 13:55:18
root / linksafe
0644
resolv.rb
74.179 KB
June 26 2024 13:55:18
root / linksafe
0644
ripper.rb
2.436 KB
June 26 2024 13:55:18
root / linksafe
0644
securerandom.rb
8.857 KB
June 26 2024 13:55:17
root / linksafe
0644
set.rb
19.42 KB
June 26 2024 13:55:18
root / linksafe
0644
shellwords.rb
7.089 KB
June 26 2024 13:55:18
root / linksafe
0644
singleton.rb
4.08 KB
June 26 2024 13:55:18
root / linksafe
0644
socket.rb
43.654 KB
June 26 2024 13:55:18
root / linksafe
0644
tempfile.rb
12.43 KB
June 26 2024 13:55:18
root / linksafe
0644
time.rb
24.27 KB
June 26 2024 13:55:18
root / linksafe
0644
timeout.rb
4 KB
June 26 2024 13:55:18
root / linksafe
0644
tmpdir.rb
4.396 KB
June 26 2024 13:55:18
root / linksafe
0644
tracer.rb
6.504 KB
June 26 2024 13:55:17
root / linksafe
0644
tsort.rb
14.299 KB
June 26 2024 13:55:18
root / linksafe
0644
un.rb
10.114 KB
June 26 2024 13:55:18
root / linksafe
0644
uri.rb
3.038 KB
June 26 2024 13:55:18
root / linksafe
0644
weakref.rb
1.458 KB
June 26 2024 13:55:18
root / linksafe
0644
yaml.rb
1.798 KB
June 26 2024 13:55:18
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF