Class: Rack::Session::SmartCookie::Base64
- Inherits:
-
Object
- Object
- Rack::Session::SmartCookie::Base64
- Defined in:
- lib/rack/session/smart_cookie.rb
Class Method Summary collapse
Class Method Details
.decode(str) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/rack/session/smart_cookie.rb', line 22 def self.decode(str) return unless str ::Base64.urlsafe_decode64(str) rescue end |
.encode(data) ⇒ Object
18 19 20 |
# File 'lib/rack/session/smart_cookie.rb', line 18 def self.encode(data) ::Base64.urlsafe_encode64(data, :padding=>false) end |