cursor
cursor copied to clipboard
The MD5 hash calculation is incorrect, except for the empty string.
It tell me how to calculate:
And I run the code, and get the different result.
Python 3.6.9 (default, Dec 8 2021, 10:25:55)
[GCC 7.3.1 20180303 (Red Hat 7.3.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import hashlib
def md5_hash(string):
md5 = hashlib.md5()
md5.update(string.encode('utf-8'))
return md5.hexdigest()
hash_value = md5_hash('value1')
print(hash_value)
>>> >>> ... ... ... ... >>> >>> 9946687e5fa0dab5993ededddb398d2e
The model behind this chat box does not actually have the ability to calculate an MD5 hash. It doesn't really understand the method to calculate an MD5 hash, just what one may look like, so to try and answer how you might want it to, it's likely either made up or reused an MD5 hash it has learnt during it's training in it's response. However, it should be noted that the models used by Cursor are not trained by Cursor, but trained by OpenAI, so Cursor doesn't have much power to change this behaviour.
@danperks is right! lmk if you have any more questions