bschoening commented on PR #1288:
URL: 
https://github.com/apache/cassandra-python-driver/pull/1288#issuecomment-4361034182

   @lratc @absurdfarce what about this approach:
   
   ```
   class MD5Token(HashToken):
       """
       A token for ``RandomPartitioner``.
       """
   
       @classmethod
       def hash_fn(cls, key):
           from hashlib import md5
           if isinstance(key, str):
               key = key.encode('UTF-8')
           return abs(varint_unpack(md5(key, usedforsecurity=False).digest()))
   ```
     
   Note, this suggest reworking import murmur3 along the same lines.


-- 
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