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

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-2.2.5/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



56
57
58
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-2.2.5/lib/rack/session/cookie.rb', line 56

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

#encode(str) ⇒ Object



52
53
54
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-2.2.5/lib/rack/session/cookie.rb', line 52

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