Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/11/2010, 09:25
Ka0stj
 
Fecha de Ingreso: febrero-2010
Ubicación: México
Mensajes: 738
Antigüedad: 14 años, 2 meses
Puntos: 37
Respuesta: encriptacion de datos

Hola marinella

Para encriptar texto puedes utilizar estas funciones que encontré en alguna ocasión por la web:

Código vb:
Ver original
  1. Public Function EncryptText(ByVal strText As String, ByVal strPwd As String)
  2.         Dim i As Integer, C As Integer
  3.         Dim strBuff As String = ""
  4.  
  5.         strPwd = UCase$(strPwd)
  6.  
  7.         'Encrypt string
  8.        If Len(strPwd) Then
  9.             For i = 1 To Len(strText)
  10.                 C = Asc(Mid$(strText, i, 1))
  11.                 C = C + Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
  12.                 strBuff = strBuff & Chr(C And &HFF)
  13.             Next i
  14.         Else
  15.             strBuff = strText
  16.         End If
  17.         EncryptText = strBuff
  18.  
  19.     End Function
  20.  
  21.     'Decrypt text encrypted with EncryptText
  22.    Public Function DecryptText(ByVal strText As String, ByVal strPwd As String)
  23.         Dim i As Integer, C As Integer
  24.         Dim strBuff As String = ""
  25.  
  26.         strPwd = UCase$(strPwd)
  27.  
  28.         'Decrypt string
  29.        If Len(strPwd) Then
  30.             For i = 1 To Len(strText)
  31.                 C = Asc(Mid$(strText, i, 1))
  32.                 C = C - Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
  33.                 strBuff = strBuff & Chr(C And &HFF)
  34.             Next i
  35.         Else
  36.             strBuff = strText
  37.         End If
  38.         DecryptText = strBuff
  39.  
  40.     End Function

En cuanto a encriptar datos de tu base de datos echale un ojo al siguiente enlace:

http://gerardoramosun.wordpress.com/...l-server-2005/

Saludos!
__________________
http://ka0stj.wordpress.com/