--- a/connectors/ConnectorBase.py Wed Mar 13 11:51:40 2019 +0300
+++ b/connectors/ConnectorBase.py Wed Mar 13 14:11:13 2019 +0300
@@ -4,7 +4,7 @@
# See COPYING file for copyrights details.
from __future__ import absolute_import
-import md5
+import hashlib
class ConnectorBase(object):
@@ -12,7 +12,7 @@
chuncksize = 1024*1024
def BlobFromFile(self, filepath, seed):
- s = md5.new()
+ s = hashlib.new('md5')
s.update(seed)
blobID = self.SeedBlob(seed)
with open(filepath, "rb") as f:
@@ -22,3 +22,4 @@
return blobID
blobID = self.AppendChunkToBlob(chunk, blobID)
s.update(chunk)
+
--- a/runtime/PLCObject.py Wed Mar 13 11:51:40 2019 +0300
+++ b/runtime/PLCObject.py Wed Mar 13 14:11:13 2019 +0300
@@ -30,7 +30,7 @@
import traceback
import shutil
from time import time
-import md5
+import hashlib
from tempfile import mkstemp
from functools import wraps, partial
from six.moves import xrange
@@ -465,7 +465,7 @@
@RunInMain
def SeedBlob(self, seed):
- blob = (mkstemp(dir=self.tmpdir) + (md5.new(),))
+ blob = (mkstemp(dir=self.tmpdir) + (hashlib.new('md5'),))
_fobj, _path, md5sum = blob
md5sum.update(seed)
newBlobID = md5sum.digest()