none
Función RRS feed

  • Pregunta

  • Hola gente!

    Alguien sabría explicarme un poco esta función?

    Public Class Form1
        Dim DES As New System.Security.Cryptography.TripleDESCryptoServiceProvider
        Dim Hash As New System.Security.Cryptography.MD5CryptoServiceProvider

     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Try
                DES.Key = Hash.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(TextBox1.Text))
                DES.Mode = Security.Cryptography.CipherMode.ECB
                Dim DESEncrypter As System.Security.Cryptography.ICryptoTransform = DES.CreateEncryptor
                Dim Buffer As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(TextBox2.Text)
                TextBox2.Text = Convert.ToBase64String(DESEncrypter.TransformFinalBlock(Buffer, 0, Buffer.Length))
            Catch ex As Exceptionç

    End try

            End Sub

    miércoles, 11 de diciembre de 2013 22:16

Respuestas

Todas las respuestas