Sample code for 30+ languages & platforms
Xojo Plugin

Base64 Encode/Decode a String

See more Encryption Examples

_LANGUAGE_ example to base-64 encode and decode a string.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

Dim bd As New Chilkat.BinData

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")
System.DebugLog(strBase64)

// To decode:
Dim bd2 As New Chilkat.BinData
success = bd2.AppendEncoded(strBase64,"base64")

Dim decoded As String
decoded = bd2.GetString("utf-8")
System.DebugLog(decoded)