MD5 Code Conversion in VB. NET

Source: Internet
Author: User
Dim MD5 as new md5cryptoserviceprovider
Dim username as byte () = (New asciiencoding). getbytes (textbox1.text)
Dim mdstring as string, mdstring1 as string, mdstring2 as string
Dim I as integer
'Convert to a hash byte array
Dim mdbyte as byte () = md5.computehash (username)
Mdstring = system. bitconverter. tostring (mdbyte)
For I = 1 to 15
Mdstring = mdstring. substring (0, 2 * I) & mdstring. substring (3 + 2 * (I-1), 47-I * 3)
Next
'Mdstring = system. bitconverter. tostring (mdbyte)
'Mdstring = (New asciiencoding). getstring (mdbyte)
Textbox2.text = mdstring

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.