diff options
author | Zuul <zuul@review.opendev.org> | 2020-11-28 14:47:43 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-11-28 14:47:43 +0000 |
commit | 007537a29eafff5bac22faf1f83c02ef75f5932f (patch) | |
tree | 8e61e48c50b95dc2fa114322d00e7a949b92a1e4 /nova/utils.py | |
parent | e2e7a917d5efc6bac5c20861945dd5b5d49259c1 (diff) | |
parent | c82ce37635e397d0e3344ff99c971d92f06aa6c5 (diff) | |
download | nova-007537a29eafff5bac22faf1f83c02ef75f5932f.tar.gz |
Merge "Replace md5 with oslo version"
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/utils.py b/nova/utils.py index 9ee45d7ad0..116bd49145 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -43,6 +43,7 @@ import oslo_messaging as messaging from oslo_utils import encodeutils from oslo_utils import excutils from oslo_utils import importutils +from oslo_utils.secretutils import md5 from oslo_utils import strutils from oslo_utils import timeutils import six @@ -785,7 +786,7 @@ def get_hash_str(base_str): """ if isinstance(base_str, six.text_type): base_str = base_str.encode('utf-8') - return hashlib.md5(base_str).hexdigest() + return md5(base_str, usedforsecurity=False).hexdigest() def get_sha256_str(base_str): |