The cryptography dependency is declared as cryptography >= 2.3, but jwcrypto no longer work with older cryptography.
I tested with cryptography ==2.3.1 and the error is displayed bellow.
In a quick check in the cryptography repo looks like SHA3_224 was add after 2.4, testing with 2.5 the import did work.
I suggest to update the dependency declaration.
I did not check if there are other problems due using older versions of cryptography.
W:\my\Projects
(jwcrypto-test) λ conda list cryp
# packages in environment at W:\my\envs\jwcrypto-test:
#
# Name Version Build Channel
asn1crypto 1.5.1 py37haa95532_0 defaults
cryptography 2.3.1 py37h74b6da3_0 defaults
jwcrypto 1.4.2 pyhd8ed1ab_0 https://conda.anaconda.org/conda-forge
W:\my\Projects
(jwcrypto-test) λ python -c "from jwcrypto import jwk"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "W:\my\envs\jwcrypto-test\lib\site-packages\jwcrypto\jwk.py", line 200, in <module>
'sha3-224': hashes.SHA3_224(),
AttributeError: module 'cryptography.hazmat.primitives.hashes' has no attribute 'SHA3_224'
The cryptography dependency is declared as
cryptography >= 2.3
, butjwcrypto
no longer work with older cryptography. I tested withcryptography ==2.3.1
and the error is displayed bellow. In a quick check in the cryptography repo looks likeSHA3_224
was add after2.4
, testing with2.5
the import did work.I suggest to update the dependency declaration. I did not check if there are other problems due using older versions of cryptography.