DataFlex
DataFlex
Decode Base64
Demonstrates how to decode base64.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoBd
String sPassword
Move False To iSuccess
Get Create (RefClass(cComChilkatBinData)) To hoBd
If (Not(IsComObjectCreated(hoBd))) Begin
Send CreateComObject of hoBd
End
// Append a base64 string to bd.
Get ComAppendEncoded Of hoBd "c2VjcmV0" "base64" To iSuccess
// The bd now contains the decoded bytes.
// Let's say it was a password string..
Get ComGetString Of hoBd "utf-8" To sPassword
// Decodes to "secret".
Showln "password = " sPassword
End_Procedure