DataFlex
DataFlex
Example: Crypt2.DecodeString method
Demonstrates how to call the DecodeString method.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoCrypt2
String sEncodedStr
String sEncoding
String sCharset
String sStr
Get Create (RefClass(cComChilkatCrypt2)) To hoCrypt2
If (Not(IsComObjectCreated(hoCrypt2))) Begin
Send CreateComObject of hoCrypt2
End
// The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="
Move "SGVsbG8gV29ybGQ=" To sEncodedStr
Move "base64" To sEncoding
Move "utf-8" To sCharset
Get ComDecodeString Of hoCrypt2 sEncodedStr sCharset sEncoding To sStr
Showln sStr
// Output is "Hello World"
End_Procedure