Skip to content

Commit db4f053

Browse files
authored
Merge pull request #11 from oreillymedia/UA-3234-Pt2
UA-3234 | Part 2, now with Py3.8 support
2 parents 72701b7 + 3f832aa commit db4f053

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

oidc_provider/models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import base64
22
import binascii
3-
from hashlib import md5, sha256
3+
import hashlib
4+
from hashlib import sha256
45
import json
56

67
from django.db import models
@@ -264,5 +265,7 @@ def __unicode__(self):
264265
@property
265266
def kid(self):
266267
return u'{0}'.format(
267-
md5(self.key.encode('utf-8'), usedforsecurity=False).hexdigest() if self.key else ''
268+
hashlib.new("md5", self.key.encode('utf-8'), usedforsecurity=False).hexdigest()
269+
if self.key
270+
else ''
268271
)

0 commit comments

Comments
 (0)