Sample code for 30+ languages & platforms
C

Example: SecureString.HashVal method

Demonstrates the HashVal method.

Chilkat C Downloads

C
#include <C_CkSecureString.h>

void ChilkatSample(void)
    {
    BOOL success;
    HCkSecureString str;
    const char *encodedHash;

    success = FALSE;

    str = CkSecureString_Create();
    CkSecureString_putMaintainHash(str,"sha256");
    CkSecureString_Append(str,"Hello World");

    encodedHash = CkSecureString_hashVal(str,"base64");
    printf("%s\n",encodedHash);


    CkSecureString_Dispose(str);

    }