rack/rack — pull request #465 by thentenaar (2012-12-10 16:26:30+00:00)
Title:  Enhance Rack::Session::Cookie with support for (optional) encryption 

Since Rack::Session::Cookie uses OpenSSL anyway, it would be nice to have easy encryption of cookies, while leaving the default behaviour intact.

This adds a new coder (Rack::Session::Cookie::Encrypted) which will wrap any custom coder the user specifies, but defaults to wrapping Rack::Session::Cookie::Base64::Marshal. This new coder will perform encryption and decryption transparently, with the result being Base64-encoded/decoded.