Public Shared Function Encode(ByVal Str As String) As String
Dim enc As System.Text.Encoding = System.Text.Encoding.Default
Dim ByteArray As Byte()
ByteArray = enc.GetBytes(Str)
Return System.Convert.ToBase64String(ByteArray)
End Function
Public Shared Function Decode(ByVal Str As String) As String
Dim enc As System.Text.Encoding = System.Text.Encoding.Default
Dim ByteArray As Byte()
ByteArray = System.Convert.FromBase64String(Str)
Return enc.GetString(ByteArray)
End Function
its simple and better... thanx :)
ReplyDelete