Skip to main content

Encrypted cookie support for the Tornado Web Framework

Project description

Encrypted cookie support for Tornado Web Server

License

This software is under the MIT License

Requirements

  • PyCrypto

  • Tornado

Please file a bug for version issues. Tested on Python 3.2.

Encryption

Encryption is done using AES256 with a 32 byte block.

Example

Handler

from tornadoencookie.encookie import EncookieMixin

class MyHandler(tornado.web.RequestHandler, EncookieMixin):
    def get(self):
        #Get a cookie
        self.encookie.get_cookie('hello')

        #Get a secure cookie
        self.encookie.get_secure_cookie('hello')

        #Set a regular cookie
        self.encookie.set_cookie('hi', 'there')

        #Set a secure cookie
        self.encookie.set_secure_cookie('hello', 'Timmy')

Configuration

application = tornado.web.Application([
    (r'/', MyHandler),
], **{
    'encookie_secret': 'iamthecookiemons',
    },
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tornado-encookie-0.0.1.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file tornado-encookie-0.0.1.tar.gz.

File metadata

File hashes

Hashes for tornado-encookie-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6f34d4dcd631cfb0f95a31fc0101a59fe4af4ef80656fc78e7b4d8816fd3fb24
MD5 8fbbd9d5d3ac1e154f78dd90d7f93cec
BLAKE2b-256 d2d692dce94b0192e9673f2529793a2971f030c1aba7056f071080ae34f70ade

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page