K krisdouglas Member Licensed User Longtime User Jul 18, 2012 #1 [howto] Return MD5 from string Hello, I am trying to return an MD5 from a string, The expected result is something like c2eaa4c670cd4c1c537b2a2ae4fbeb5d from the string "ding". However I am getting something completely different, I think I am having a bit of a moron moment. I was wondering what the best practice was with regards to this. Thank you. Last edited: Jul 18, 2012
[howto] Return MD5 from string Hello, I am trying to return an MD5 from a string, The expected result is something like c2eaa4c670cd4c1c537b2a2ae4fbeb5d from the string "ding". However I am getting something completely different, I think I am having a bit of a moron moment. I was wondering what the best practice was with regards to this. Thank you.
K krisdouglas Member Licensed User Longtime User Jul 18, 2012 #2 OK, to answer my own question, the following is needed: Libs: ByteConverter Encryption Code: Copy Dim md As MessageDigest Dim ByteCon As ByteConverter Dim passwordhash() As Byte passwordhash = md.GetMessageDigest(p.GetBytes("UTF8"),"MD5") dim md5string as String md5string = ByteCon.HexFromBytes(passwordhash) msgbox(md5string,"This is the MD5") Last edited: Jul 18, 2012 Upvote 0
OK, to answer my own question, the following is needed: Libs: ByteConverter Encryption Code: Copy Dim md As MessageDigest Dim ByteCon As ByteConverter Dim passwordhash() As Byte passwordhash = md.GetMessageDigest(p.GetBytes("UTF8"),"MD5") dim md5string as String md5string = ByteCon.HexFromBytes(passwordhash) msgbox(md5string,"This is the MD5")
S socialnetis Active Member Licensed User Longtime User May 2, 2013 #6 Hi, isn't the hash suppose to have numbers, and uppercase and lowercase letters? I only get number and uppercase letters Upvote 0
Hi, isn't the hash suppose to have numbers, and uppercase and lowercase letters? I only get number and uppercase letters
agraham Expert Licensed User Longtime User May 2, 2013 #7 It is a hex value so it doesn't matter. Upvote 0