Class: Rack::Protection::EncryptedCookie::Base64::Marshal
- Inherits:
-
Rack::Protection::EncryptedCookie::Base64
- Object
- Rack::Protection::EncryptedCookie::Base64
- Rack::Protection::EncryptedCookie::Base64::Marshal
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.5/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/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.5/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/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.5/lib/rack/protection/encrypted_cookie.rb', line 77 def encode(str) super(::Marshal.dump(str)) end |