C++
C++
Example: Crypt2.DecodeString method
Demonstrates how to call the DecodeString method.Chilkat C++ Downloads
#include <CkCrypt2.h>
void ChilkatSample(void)
{
CkCrypt2 crypt2;
// The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="
const char *encodedStr = "SGVsbG8gV29ybGQ=";
const char *encoding = "base64";
const char *charset = "utf-8";
const char *str = crypt2.decodeString(encodedStr,charset,encoding);
std::cout << str << "\r\n";
// Output is "Hello World"
}