lratc commented on code in PR #1288:
URL: 
https://github.com/apache/cassandra-python-driver/pull/1288#discussion_r3172821897


##########
cassandra/metadata.py:
##########
@@ -1864,7 +1864,7 @@ class MD5Token(HashToken):
     def hash_fn(cls, key):
         if isinstance(key, str):
             key = key.encode('UTF-8')
-        return abs(varint_unpack(md5(key).digest()))
+        return 
abs(varint_unpack(hashlib.md5(key,usedforsecurity=False).digest()))

Review Comment:
   You raise some very good points - on further inspection, the 
usedforsecurity=False isn't resolving the issue I was experiencing - not trying 
to import md5 at that point is what has resolved the issue.  Moving the import 
into the class would be a much better solution.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to