Skip navigation

Before I found a small code piece to easily secure data in .Net; I've always felt a little disturbed when sending my query strings and information like user names, passwords etc. to other pages in ASP.Net without Encrypting/Decrypting my UserName/Passwords in databases. The code is written below.

Simple copy and paste it to any class in Visual basic project form and start using it.

Sub DoEncryptionDecryption

    dim objHash as new Hashing

    dim strEncryptedText as string=““

     strEncryptedText = objHash.encrypt(“TextToEncrypt“)

     Messagebox.show(strEncryptedText)

     dim strDecryptedText as string

     strDecryptedText = objHash.Decrypt (strEncryptedText)

     Messagebox.show(strDecryptedText )

End Sub

Hashing Class is written below in the code example

Regards

Yasir Attiq Butt

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish