Visual Basic 6.0
Visual Basic 6.0
Base64 Encode/Decode a String
See more Encryption Examples
_LANGUAGE_ example to base-64 encode and decode a string.Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim bd As New ChilkatBinData
Dim s As String
s = "A friend called me up the other day and talked about investing in a dot-com that sells lobsters. Internet lobsters. Where will this end? --Donald Trump"
success = bd.AppendString(s,"utf-8")
Dim strBase64 As String
strBase64 = bd.GetEncoded("base64")
Debug.Print strBase64
' To decode:
Dim bd2 As New ChilkatBinData
success = bd2.AppendEncoded(strBase64,"base64")
Dim decoded As String
decoded = bd2.GetString("utf-8")
Debug.Print decoded