将字符串转换为md5

编程入门 行业动态 更新时间:2024-10-28 00:15:36
本文介绍了将字符串转换为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

本文发布于:2023-10-22 22:45:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1518949.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转换为   字符串

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!