[VB.Net]Base64 Encode/Decode 03-28-2011, 05:20 PM
#1
Function:
Encode
Decode
Usage:
If you have any questions, post
Encode
Code:
Public Function ConvertToBase64(ByVal Input As String)
Return Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(Input))
End FunctionDecode
Code:
Public Function ConvertFromBase64(ByVal Input As String)
Dim B As Byte() = System.Convert.FromBase64String(Input)
Return System.Text.Encoding.UTF8.GetString(B)
End FunctionUsage:
Code:
MsgBox(ConvertToBase64("hi"))
MsgBox(ConvertFromBase64("aGk="))Spoiler: Credits
Go to completely myself i didn't get any help on this. just a bit exploring the IntelliSense.
If you have any questions, post
Pierce the life fibers with your drill.
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)