Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

Commit 24c8004

Browse files
committed
pycrypto 2.6 has the functions we need
1 parent 2b62466 commit 24c8004

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

Diff for: jwt/__init__.py

-13
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@
33
from calendar import timegm
44
from base64 import urlsafe_b64encode
55
from os import urandom
6-
7-
from Crypto.Hash import SHA512 as Hasher
8-
from hashlib import sha512 as hasher
9-
from python_pkcs1_v1_5.wrapper import Wrapper
10-
# From https://github.com/dlitz/pycrypto/blob/master/lib/Crypto/Hash/SHA512.py
11-
# Change oid if change hash method.
12-
def _new_Hasher_new(data=""):
13-
obj = Wrapper(hasher, data)
14-
obj.oid = '\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x03'
15-
obj.new = _new_Hasher_new
16-
return obj
17-
Hasher.new = _new_Hasher_new
18-
196
import jws
207

218
def to_jwt(claim, rsa_priv_key, lifetime=None, expires=None):

0 commit comments

Comments
 (0)