Permalink
Browse files

Flesh out example

  • Loading branch information...
1 parent 2b27425 commit d43f67ebd4d2966d043ebfa767b5fff2f42e2cf5 @brianloveswords committed Jun 2, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 examples/ragecrypto.py
View
@@ -32,3 +32,13 @@ def verify(self, msg, sig, key):
# named groups will be sent to the class constructor
(r'^(?P<fval>f+)(?P<uval>u+)$', FXUY),
]
+
+## now this will be the algorithm discovered for any of the following headers:
+# will sign with FXUY(fval=3, uval=3).sign
+jws.sign({'alg': 'fffuuu'}, {'claim':'rad'}, 'key')
+
+# will sign with FXUY(fval=1, uval=8).sign
+jws.sign({'alg': 'fuuuuuuuu'}, {'claim':'rad'}, 'key')
+
+# will sign with FXUY(fval=7, uval=12).sign
+jws.sign({'alg': 'fffffffuuuuuuuuuuu'}, {'claim':'rad'}, 'key')

0 comments on commit d43f67e

Please sign in to comment.