summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorarkedos <arkedos@mailbox.org>2019-12-08 22:14:19 +0100
committertoonn <toonn@toonn.io>2019-12-23 16:37:13 +0100
commit815e31aee01f813adf0516d82142ac011dc394e2 (patch)
tree982476128c225de02b894eb5469d4ff806cb5970
parentce0753b6a7eedb4ef616e9d9433bd73a0a617226 (diff)
downloadranger-815e31aee01f813adf0516d82142ac011dc394e2.tar.gz
Replacing md5 with sha256
-rw-r--r--ranger/core/filter_stack.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/ranger/core/filter_stack.py b/ranger/core/filter_stack.py
index 0e0d4807..5c1297e5 100644
--- a/ranger/core/filter_stack.py
+++ b/ranger/core/filter_stack.py
@@ -91,13 +91,8 @@ class HashFilter(BaseFilter):
         return "<Filter: hash {}>".format(self.args)
 
     def get_hash(self, file_basename):
-        import sys
-        if sys.version_info.major < 3:
-            from hashlib import md5
-            self.hasher = md5()
-        elif sys.version_info.major == 3:
-            import hashlib
-            self.hasher = hashlib.blake2b()
+        from hashlib import sha256
+        self.hasher = sha256()
         data = open(file_basename, 'rb')
         buff = data.read()
         self.hasher.update(buff)