Articulo escrito

  • on 29.07.2008
  • a las 09:13 PM
  • por rhypee

Usando el MD5 para encriptar datos 0

Jul29


Imports System.Security.Cryptography
Imports System.Text
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim md5 As New MD5CryptoServiceProvider
MsgBox(getMd5Hash(texto.Text))
End Sub
Public Function getMd5Hash(ByVal input As String) As String
Dim md5Hasher As New MD5CryptoServiceProvider()
Dim data As Byte() = md5Hasher.ComputeHash(Encoding.Default.GetBytes(input))
Dim sBuilder As New StringBuilder()
Dim i As Integer
For i = 0 To data.Length – 1
sBuilder.Append(data(i).ToString(”x2″))
Next i
Return sBuilder.ToString()
End Function
End Class

Si te gusto, comparteme These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • BarraPunto
  • Facebook
  • Google Bookmarks
  • Meneame
  • Technorati
  • TwitThis
  • Wikio ES

subscribe to comments RSS

Este post no no tiene aun comentarios

Escribe un comentario, es gratuito

* these are required fields

rhypee 2.0 is powered by WordPress and FREEmium Theme.
developed by Dariusz Siedlecki and brought to you by FreebiesDock.com