Forum Discussion
Chuck_13207
Nimbostratus
Sep 06, 2012Obtaining MD5 hash of a string
So when I try and do this
set HASH [ md5 $var1]
The var $HASH is just junk and not a MD5 hash string. Can someone point me in the right direction?
2 Replies
- Kevin_Stewart
Employee
MD5 produces a binary object in iRules.
https://devcentral.f5.com/wiki/iRules.md5.ashx
To see what you'd expect from something like md5sum, do a binary scan and convert to hex:when HTTP_REQUEST { set var1 "this is a test" binary scan [md5 $var1] H* key log local0. $key }
** create a file and enter "this is a test" as its contents, then run md5sum against that file. You'll get the same value. - Chuck_13207
Nimbostratus
I had just found that and was getting ready to post that I did.
thank you for replying
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects