Encriptacion

22/11/2004 - 00:57 por Lian | Informe spam
Alguien tiene o me puede decir alguna clase ya echa que
solo ponga un pass y Encripte y desencripte con todo lo
de la seguridad de framework.

Osea lo que quiero es solo poner pass sin tener que
aprender todo ese rollo de Encriptacion .

Preguntas similare

Leer las respuestas

#1 Eduardo A. Morcillo [MS MVP VB]
22/11/2004 - 01:45 | Informe spam
Aqui tienes una funcion para encriptar un string:

Public Shared Function Encrypt(ByVal text As String, ByVal password
As String) As String

' Create the 3DES provider object
Dim tdes As New TripleDESCryptoServiceProvider

' Convert the string to a byte array
Dim data() As Byte = UTF8.GetBytes(text)

' Derive the key from the password
Dim iv() As Byte = {0, 0, 0, 0, 0, 0, 0, 0}
Dim keyb() As Byte = (New PasswordDeriveBytes(password,
iv).CryptDeriveKey("TripleDES", "MD5", tdes.KeySize, iv))

' Create an encryptor object
Dim transform As ICryptoTransform = tdes.CreateEncryptor(keyb, iv)

' Encrypt the string, convert the result to Base64 and UrlEncode
it
Return
System.Convert.ToBase64String(transform.TransformFinalBlock(data, 0,
data.Length))

End Function

La funcion para desencriptar te queda de tarea, que como puedes ver no es
tan complicado y nunca esta demas aprender. :)

Eduardo A. Morcillo [MS MVP VB]
Respuesta Responder a este mensaje
#2 DJ MIAO
22/11/2004 - 03:54 | Informe spam
Comprate un libro.


Miao...

Alguien tiene o me puede decir alguna clase ya echa que
solo ponga un pass y Encripte y desencripte con todo lo
de la seguridad de framework.

Osea lo que quiero es solo poner pass sin tener que
aprender todo ese rollo de Encriptacion .

.

Respuesta Responder a este mensaje
#3 DJ MIAO
22/11/2004 - 03:56 | Informe spam
Gran ayuda no? Le ensenas como cerrar el candado pero no
la llave para abrirlo.




Miao..
Comprate un libro.

Aqui tienes una funcion para encriptar un string:

Public Shared Function Encrypt(ByVal text As


String, ByVal password
As String) As String

' Create the 3DES provider object
Dim tdes As New


TripleDESCryptoServiceProvider

' Convert the string to a byte array
Dim data() As Byte = UTF8.GetBytes(text)

' Derive the key from the password
Dim iv() As Byte = {0, 0, 0, 0, 0, 0, 0, 0}
Dim keyb() As Byte = (New PasswordDeriveBytes


(password,
iv).CryptDeriveKey("TripleDES", "MD5", tdes.KeySize, iv))

' Create an encryptor object
Dim transform As ICryptoTransform =


tdes.CreateEncryptor(keyb, iv)

' Encrypt the string, convert the result to


Base64 and UrlEncode
it
Return
System.Convert.ToBase64String


(transform.TransformFinalBlock(data, 0,
data.Length))

End Function

La funcion para desencriptar te queda de tarea, que como


puedes ver no es
tan complicado y nunca esta demas aprender. :)

Eduardo A. Morcillo [MS MVP VB]
.

Respuesta Responder a este mensaje
#4 Lian
22/11/2004 - 04:01 | Informe spam
Gracias Eduardo . Lo que pasa que soy nuevo en esto.Y veo
que la seguridad es algo que necesita uno dedicarle
tiempo para entenderlo bien y pues tiempo es lo menos que
tengo.

Si pudieras decirle como a hora decencriptar.
Gracias..

Aqui tienes una funcion para encriptar un string:

Public Shared Function Encrypt(ByVal text As


String, ByVal password
As String) As String

' Create the 3DES provider object
Dim tdes As New


TripleDESCryptoServiceProvider

' Convert the string to a byte array
Dim data() As Byte = UTF8.GetBytes(text)

' Derive the key from the password
Dim iv() As Byte = {0, 0, 0, 0, 0, 0, 0, 0}
Dim keyb() As Byte = (New PasswordDeriveBytes


(password,
iv).CryptDeriveKey("TripleDES", "MD5", tdes.KeySize, iv))

' Create an encryptor object
Dim transform As ICryptoTransform =


tdes.CreateEncryptor(keyb, iv)

' Encrypt the string, convert the result to


Base64 and UrlEncode
it
Return
System.Convert.ToBase64String


(transform.TransformFinalBlock(data, 0,
data.Length))

End Function

La funcion para desencriptar te queda de tarea, que como


puedes ver no es
tan complicado y nunca esta demas aprender. :)

Eduardo A. Morcillo [MS MVP VB]
.

Respuesta Responder a este mensaje
#5 Juan Kautho
22/11/2004 - 04:15 | Informe spam
Encripción Y Cifrado con Visual Basic .Net en WindowsForms
http://www.willydev.net/Descargas/c...e/crip.zip

Criptografía, Claves y certificados con .Net FrameWork
http://www.willydev.net/descargas/C...tifica.pdf

"Lian" wrote in message
news:7a8b01c4d03f$8c03e8c0$
Gracias Eduardo . Lo que pasa que soy nuevo en esto.Y veo
que la seguridad es algo que necesita uno dedicarle
tiempo para entenderlo bien y pues tiempo es lo menos que
tengo.

Si pudieras decirle como a hora decencriptar.
Gracias..

Aqui tienes una funcion para encriptar un string:

Public Shared Function Encrypt(ByVal text As


String, ByVal password
As String) As String

' Create the 3DES provider object
Dim tdes As New


TripleDESCryptoServiceProvider

' Convert the string to a byte array
Dim data() As Byte = UTF8.GetBytes(text)

' Derive the key from the password
Dim iv() As Byte = {0, 0, 0, 0, 0, 0, 0, 0}
Dim keyb() As Byte = (New PasswordDeriveBytes


(password,
iv).CryptDeriveKey("TripleDES", "MD5", tdes.KeySize, iv))

' Create an encryptor object
Dim transform As ICryptoTransform > tdes.CreateEncryptor(keyb, iv)

' Encrypt the string, convert the result to


Base64 and UrlEncode
it
Return
System.Convert.ToBase64String


(transform.TransformFinalBlock(data, 0,
data.Length))

End Function

La funcion para desencriptar te queda de tarea, que como


puedes ver no es
tan complicado y nunca esta demas aprender. :)

Eduardo A. Morcillo [MS MVP VB]
.

Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaSiguiente Respuesta Tengo una respuesta
Search Busqueda sugerida