Class: Krypton::B64
- Inherits:
-
Object
- Object
- Krypton::B64
- Defined in:
- lib/core/base64.rb
Overview
This class contains wrapper functions around the ‘[en|de]code64 functions in the ’base64’ library
Class Method Summary collapse
Class Method Details
.decode(data, urlsafe = false) ⇒ Object
8 9 10 |
# File 'lib/core/base64.rb', line 8 def self.decode(data, urlsafe=false) urlsafe ? Base64.urlsafe_decode64(data) : Base64.decode64(data) end |
.encode(data, urlsafe = false) ⇒ Object
4 5 6 |
# File 'lib/core/base64.rb', line 4 def self.encode(data, urlsafe=false) urlsafe ? Base64.urlsafe_encode64(data) : Base64.encode64(data) end |