Sample code for 30+ languages & platforms
PowerBuilder

Decode Base64

Demonstrates how to decode base64.

Chilkat PowerBuilder Downloads

PowerBuilder
integer li_rc
integer li_Success
oleobject loo_Bd
string ls_Password

li_Success = 0

loo_Bd = create oleobject
li_rc = loo_Bd.ConnectToNewObject("Chilkat.BinData")
if li_rc < 0 then
    destroy loo_Bd
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// Append a base64 string to bd.
li_Success = loo_Bd.AppendEncoded("c2VjcmV0","base64")

// The bd now contains the decoded bytes.
// Let's say it was a password string..
ls_Password = loo_Bd.GetString("utf-8")

// Decodes to "secret".
Write-Debug "password = " + ls_Password


destroy loo_Bd