diff --git a/moto/s3/models.py b/moto/s3/models.py index 524d547e9..62de695fa 100644 --- a/moto/s3/models.py +++ b/moto/s3/models.py @@ -1,5 +1,5 @@ import datetime -import md5 +import hashlib from moto.core import BaseBackend from moto.core.utils import iso_8601_datetime, rfc_1123_datetime @@ -22,7 +22,7 @@ class FakeKey(object): @property def etag(self): - value_md5 = md5.new() + value_md5 = hashlib.md5() value_md5.update(self.value) return '"{0}"'.format(value_md5.hexdigest()) diff --git a/moto/sqs/models.py b/moto/sqs/models.py index 3f3b6b493..5c6d04fe7 100644 --- a/moto/sqs/models.py +++ b/moto/sqs/models.py @@ -1,4 +1,4 @@ -import md5 +import hashlib import time from moto.core import BaseBackend @@ -15,7 +15,7 @@ class Message(object): @property def md5(self): - body_md5 = md5.new() + body_md5 = hashlib.md5() body_md5.update(self.body) return body_md5.hexdigest()