We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
>>> import jws >>> header = {'alg': 'RS256'} >>> payload = { 'claim': 'JSON is the raddest.', 'iss': 'brianb' } >>> signature = jws.sign(header, payload, 'secret') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/jws/__init__.py", line 29, in sign signature = signer(_signing_input(head, payload, is_json), key) File "/Library/Python/2.7/site-packages/jws/algos.py", line 74, in sign return self.padder.new(key).sign(self.hashm) # pycrypto 2.5 File "build/bdist.macosx-10.10-intel/egg/Crypto/Signature/PKCS1_v1_5.py", line 106, in sign AttributeError: 'str' object has no attribute 'n'
I couldn't find anything related to this issue. I have pycrypto 2.6.1
Thanks.
The text was updated successfully, but these errors were encountered:
@damjtoh - I got that error too when I tried passing a string as the secret key.
Try this:
from Crypto.PublicKey import RSA key = RSA.importKey('secret') ... signature = jws.sign(header, payload, key)
Sorry, something went wrong.
No branches or pull requests
I couldn't find anything related to this issue.
I have pycrypto 2.6.1
Thanks.
The text was updated successfully, but these errors were encountered: