decrypt the dataset
-
hi sir i am using following code for encrypt my textbox value and save it in encrypted form to our database. Public function encrp(ByVal enc As String) As String Dim ctr As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(enc) Dim c As String = System.Convert.ToBase64String(ctr) Return c End function and following code for decrypt the value for showing in textbox Public function decryp(ByVal c As String) As String Dim b1 As Byte() = System.Convert.FromBase64String(c) Dim f As String = System.Text.ASCIIEncoding.ASCII.GetString(b1) Return f End function but sir i am unable to decrypt my dataset with the help of this function to show the record in datagridview.so please help me for decrypt the dataset.
-
hi sir i am using following code for encrypt my textbox value and save it in encrypted form to our database. Public function encrp(ByVal enc As String) As String Dim ctr As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(enc) Dim c As String = System.Convert.ToBase64String(ctr) Return c End function and following code for decrypt the value for showing in textbox Public function decryp(ByVal c As String) As String Dim b1 As Byte() = System.Convert.FromBase64String(c) Dim f As String = System.Text.ASCIIEncoding.ASCII.GetString(b1) Return f End function but sir i am unable to decrypt my dataset with the help of this function to show the record in datagridview.so please help me for decrypt the dataset.
You call converting a string to Base64 encrypted? That's not encrypted at all. The code is correct as far as I can see. You're going to have to double-check what you're passing into each method and what you're getting back.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
You call converting a string to Base64 encrypted? That's not encrypted at all. The code is correct as far as I can see. You're going to have to double-check what you're passing into each method and what you're getting back.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...hi sir , send code in decrypted dataset in database please sir
-
hi sir , send code in decrypted dataset in database please sir
No, I'm not giving you any code. You've already got the code that does the job. For some reason, you've either not following what youre passing into the encryption/decryption methods or you're not storing or retrieving the data from the database properly.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...