Module: NewRelic::Base64
Instance Method Summary collapse
- #decode64(str) ⇒ Object
- #encode64(bin) ⇒ Object
- #strict_decode64(str) ⇒ Object
- #strict_encode64(bin) ⇒ Object
Instance Method Details
#decode64(str) ⇒ Object
13 14 15 |
# File 'lib/new_relic/base64.rb', line 13 def decode64(str) str.unpack1('m') end |
#encode64(bin) ⇒ Object
9 10 11 |
# File 'lib/new_relic/base64.rb', line 9 def encode64(bin) [bin].pack('m') end |
#strict_decode64(str) ⇒ Object
21 22 23 |
# File 'lib/new_relic/base64.rb', line 21 def strict_decode64(str) str.unpack1('m0') end |
#strict_encode64(bin) ⇒ Object
17 18 19 |
# File 'lib/new_relic/base64.rb', line 17 def strict_encode64(bin) [bin].pack('m0') end |