Skip to content

Instantly share code, notes, and snippets.

@andymckay
Created August 31, 2011 21:29
Show Gist options
  • Save andymckay/1184769 to your computer and use it in GitHub Desktop.
Save andymckay/1184769 to your computer and use it in GitHub Desktop.
>>> import jwt
>>> key = jwt.rsa_load('/Users/andy/sandboxes/zamboni/apps/files/fixtures/certs/server.key')
>>> data = {'foo':'bar'}
>>> res = jwt.encode(data, key)
>>> jwt.check(res, key)
True
>>> key2 = jwt.rsa_load('/Users/andy/sandboxes/zamboni/apps/files/fixtures/certs/server.key')
>>> jwt.check(res, key2)
False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment