Class: Rack::Protection::EncryptedCookie::Base64::Marshal
- Inherits:
-
Rack::Protection::EncryptedCookie::Base64
- Object
- Rack::Protection::EncryptedCookie::Base64
- Rack::Protection::EncryptedCookie::Base64::Marshal
- Defined in:
- lib/rack/protection/encrypted_cookie.rb
Overview
Encode session cookies as Marshaled Base64 data
Instance Method Summary collapse
Instance Method Details
#decode(str) ⇒ Object
81 82 83 84 85 86 87 88 89 |
# File 'lib/rack/protection/encrypted_cookie.rb', line 81 def decode(str) return unless str begin ::Marshal.load(super(str)) rescue StandardError nil end end |
#encode(str) ⇒ Object
77 78 79 |
# File 'lib/rack/protection/encrypted_cookie.rb', line 77 def encode(str) super(::Marshal.dump(str)) end |