Class: Rack::Protection::EncryptedCookie::Base64
- Inherits:
-
Object
- Object
- Rack::Protection::EncryptedCookie::Base64
- Defined in:
- lib/rack/protection/encrypted_cookie.rb
Overview
Encode session cookies as Base64
Defined Under Namespace
Classes: JSON, Marshal, ZipJSON
Instance Method Summary collapse
Instance Method Details
#decode(str) ⇒ Object
71 72 73 |
# File 'lib/rack/protection/encrypted_cookie.rb', line 71 def decode(str) str.unpack1('m') end |
#encode(str) ⇒ Object
67 68 69 |
# File 'lib/rack/protection/encrypted_cookie.rb', line 67 def encode(str) [str].pack('m0') end |