Scripts: asp :: ASP.NET encryption :: Library Article #4
Developer's Section
Encrypt a String in ASP.NET By: Erobo Team Member
Hire a Developer for Related Work / Installation | $55 hr
Rating: | Rate It:
Average Votes: (3388)
Favorites:
learn to encrypt a string in ASP.NET
Learn to encrypt a string in ASP.NET
Building the Encryptor
Code Snippet 1
Private Function EncryptTripleDES(ByVal Plaintext As String,
ByVal Key As String) As String
'Create Cryptography Objects
Dim DES As New System.Security.Cryptography.TripleDESCryptoServiceProvider
'Create Hash type MD5
Dim hashMD5 As New System.Security.Cryptography.MD5CryptoServiceProvider
'Assign key
DES.Key = hashMD5.ComputeHash
(System.Text.ASCIIEncoding.ASCII.GetBytes(Key))