-2

When i am using the md5 hash fuction like this in wrangler

set-column :numbertohash "12345"

hash :numbertohash MD5 true

i am getting the output like this its 32 0's are appended at start

expected md5 for 12345 is :: 827ccb0eea8a706c4c34a16891f84e7b

i am getting md5 like this :: 00000000000000000000000000000000827ccb0eea8a706c4c34a16891f84e7b

enter image description here

please let me know if any one have idea why i am getting those 0 (zero's) at start.

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
naveen
  • 29
  • 4
  • MD5 is just a 128bit value. For some reason it's displayed to you as if it were a 256bit value (i.e. with some prefixed 0-s). I don't know anything about the tool you're using, but I don't think this should cause any issues. – Joachim Sauer May 30 '23 at 15:57

2 Answers2

1

If 'encode' option is set to true, the hashed digest is encoded as hex with left-padding zeroes. See documentation here.

vanathi-g
  • 36
  • 1
0

The 32 zeroes cannot be reversed into string, therefore the zeroes can be ignored. It might be a possible bug, and you can file it in the Public Issue Tracker. 

Poala Astrid
  • 1,028
  • 2
  • 10