Created
August 31, 2011 21:29
-
-
Save andymckay/1184769 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> 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