Public Shared Function Encrypt(ByVal str As String, ByVal strKey As String) As String cryptDES3.Key = cryptMD5Hash.ComputeHash(ASCIIEncoding.ASCII.GetBytes(strKey)) cryptDES3.Mode = CipherMode.ECB Dim desdencrypt As ICryptoTransform = cryptDES3.CreateEncryptor() Dim buff() As Byte = ASCIIEncoding.ASCII.GetBytes(str) Return (Convert.ToBase64String(desdencrypt.TransformFinalBlock(buff, 0, buff.Length))) End Function
CryptoStream
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)