Author: Nsan | Posted on: 12/20/2008 10:39:18 AM | Views : 277

I am trying to decrypt an encrypted value from a database. 

Passing the private field to the encryption function within the property block is not working:

 returns encrypted value from the database without decryption


 Public Property Name() as string
      Get
       Name = sc.decrypt(m_Name, pk)
      End Get
      Set(ByVal Value as string)
         m_lastName = sc.encrypt(Value, pk)
      End Set
   End Property

but works when with the following:

 If ret = 0 And loginUser.decrypt(loginUsername.name, PK) = Request.QueryString("name") And iReferralURL > 0 Then

class def


Function Encrypt(ByVal strPlainText As String, ByVal strKey24 As String)
Function Decrypt(ByVal s ...

Go to the complete details ...