Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Security.Cryptography
- Shared Function Encode(ByVal value As String, _
- ByVal key As String) As String
- Dim mac3des As New System.Security.Cryptography.MACTripleDES()
- Dim md5 As New System.Security.Cryptography.MD5CryptoServiceProvider()
- mac3des.Key = md5.ComputeHash(System.Text.Encoding.UTF8.GetBytes(key))
- Return Convert.ToBase64String( _
- System.Text.Encoding.UTF8.GetBytes(value)) & "-"c & _
- Convert.ToBase64String(mac3des.ComputeHash( _
- System.Text.Encoding.UTF8.GetBytes(value)))
- End Function
Add Comment
Please, Sign In to add comment