Class: Rack::Session::Cookie::Base64

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/session/cookie.rb

Overview

Encode session cookies as Base64

Direct Known Subclasses

JSON, Marshal, ZipJSON

Defined Under Namespace

Classes: JSON, Marshal, ZipJSON

Instance Method Summary collapse

Instance Method Details

#decode(str) ⇒ Object



98
99
100
# File 'lib/rack/session/cookie.rb', line 98

def decode(str)
  ::Base64.decode64(str)
end

#encode(str) ⇒ Object



94
95
96
# File 'lib/rack/session/cookie.rb', line 94

def encode(str)
  ::Base64.strict_encode64(str)
end