Wizard's Toolkit Logo Wizard's Toolkit Sprite
Mac OS X
Flattr this

Convert Plaintext to Ciphertext and Back with the Wizard's Toolkit API

The Wizard's Toolkit API is a low-level interface between the C programming language and the Toolkit's libraries. A description of the public methods are found here:

After you write your Toolkit program, compile it like this:

  cc `WizardsToolkit-config --cflags --cppflags` -o wizard wizard.c `WizardsToolkit-config --ldflags --libs`

Here is a example program that utilizes the Wizard's Toolkit API to get you started, wizard.c. It simply computes and prints the Secure Hash Algorithm 2, with a 512-bit digest, of a string.

#include <stdio.h> #include <wizard/WizardsToolkit.h> int main(int argc,char **argv) { HashInfo *hash_info; StringInfo *content; /* Initialize the Wizard's Toolkit. */ WizardsToolkitGenesis(*argv); /* Compute hash digest of a message. */ hash_info=AcquireHashInfo(SHA2512Hash); InitializeHash(hash_info); content=StringToStringInfo("The Wizard's Toolkit"); UpdateHash(hash_info,content); FinalizeHash(hash_info); /* Print the hash digest of the message. */ PrintStringInfo("Content",content); PrintStringInfo("Digest",GetHashDigest(hash_info)); /* Clean up. */ DestroyHashInfo(hash_info); DestroyStringInfo(content); WizardsToolkitTerminus(); return(0); }