本文介绍了将字符串转换为md5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好 我想像这样将字符串转换为md5
Hey all I want to convert a string to md5 like this
1234567890123475e8dd316726b0335 = 8f 43 ae 1a 33 19 c6 49 cc 57 40 8b 6a 39 2d 6b在此先感谢 请帮助我
Thanks in advance Please Help me
推荐答案MSDN示例: msdn.microsoft/en-us/library/system. security.cryptography.md5.aspx [ ^ ] 第三方博客的示例: warren5236.wordpress/2007/12/26 /calculating-an-md5-hash-in-vbnet/ [ ^ ] MSDN example: msdn.microsoft/en-us/library/system.security.cryptography.md5.aspx[^] Example from 3rd party blog: warren5236.wordpress/2007/12/26/calculating-an-md5-hash-in-vbnet/[^]
MD5较弱且易于破解.如果数据安全是一个真正的问题,您可能需要重新考虑使用它. MD5 is known to be weak and easily cracked. You may want to reconsider using it if security of data is a real issue.
这就是我曾经使用和工作的 试试吧 This is what i used and worked try it Dim md5 As MD5 = System.Security.Cryptography.MD5.Create() Dim inputBytes As Byte() = System.Text.Encoding.ASCII.GetBytes("1234567890123475e8dd316726b0335") Dim hash As Byte() = md5.ComputeHash(inputBytes) Dim sb As New StringBuilder() For i As Integer = 0 To hash.Length - 1 sb.Append(hash(i).ToString("x2")) Next TextBox1.Text = sb.ToString
希望我能帮上忙
Hope i helped
更多推荐
将字符串转换为md5
发布评论