I Import the Imports System.Security.Cryptography
to encrypt my password but using this and adding this code.
Public Function EncryptData(ByVal plaintext As String) As String
Dim plainttextBytes() As Byte = System.Text.Encoding.Unicode.GetBytes(plaintext)
Dim ms As New System.IO.MemoryStream
Dim encStream As New CryptoStream(ms, TripleDES.CreateEncryptor(), System.Security.Cryptography.CryptoStreamMode.Write)
encStream.Write(plainttextBytes, 0, plainttextBytes.Length)
encStream.FlushFinalBlock()
Return Convert.ToBase64String(ms.ToArray)
End Function
I'm having a error Reference to a non-shared member requires an object reference
. Can someone help me. Thanks