Sample code for 30+ languages & platforms
Xbase++

Example: Crypt2.DecodeString method

Demonstrates how to call the DecodeString method.

Chilkat Xbase++ Downloads

Xbase++
LOCAL oCrypt2
LOCAL cEncodedStr
LOCAL cEncoding
LOCAL cCharset
LOCAL cStr

oCrypt2 := CreateObject("Chilkat.Crypt2")

//  The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="

cEncodedStr := "SGVsbG8gV29ybGQ="
cEncoding := "base64"
cCharset := "utf-8"

cStr := oCrypt2:DecodeString(cEncodedStr, cCharset, cEncoding)
? cStr

//  Output is "Hello World"

oCrypt2:destroy()