Merge pull request #14 from stefanocudini/master
sha module is deprecated replaced with hashlib module
This commit is contained in:
@@ -25,7 +25,7 @@ from urlparse import urlparse
|
|||||||
import os
|
import os
|
||||||
import struct
|
import struct
|
||||||
import uuid
|
import uuid
|
||||||
import sha
|
import hashlib
|
||||||
import base64
|
import base64
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@@ -443,7 +443,7 @@ class WebSocket(object):
|
|||||||
result = result.lower()
|
result = result.lower()
|
||||||
|
|
||||||
value = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
|
value = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
|
||||||
hashed = base64.encodestring(sha.sha(value).digest()).strip().lower()
|
hashed = base64.encodestring(hashlib.sha1(value).digest()).strip().lower()
|
||||||
return hashed == result
|
return hashed == result
|
||||||
|
|
||||||
def _read_headers(self):
|
def _read_headers(self):
|
||||||
|
Reference in New Issue
Block a user