Unix
Mac OS X
Windows
Options
Unix
Windows

# 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:

- American Encryption Standard Methods
- Authentication Methods
- Binary Large OBjectS Methods
- Bzip Entropy Methods
- Client Methods
- Cyclic Redunancy Checksum Methods
- Secure Cipher Methods
- Entropy Methods
- Exception Methods
- File Methods
- Secure Hash Algorithm Methods
- Hash-map and Linked-list Methods
- Keyed-Hashing for Message Authentication
- Key Methods
- Keyring Methods
- LZMA Entropy Methods
- Log Events
- Wizard Methods
- Message Digest Algorithm Methods
- Memory Allocation Methods
- Mime Methods
- Option Methods
- Passphrase Methods
- Random Numbers Methods
- Get/Set Resources
- Environment Sanitazion Methods
- Secret Authentication Methods
- Semaphore Methods
- Secure Hash Algorithm 1 Methods
- Secure Hash Algorithm 2-224 Methods
- Secure Hash Algorithm 2-256 Methods
- Secure Hash Algorithm 2-384 Methods
- Secure Hash Algorithm 2-512 Methods
- Secure Hash Algorithm 3 Methods
- Self-adjusting Binary Tree Methods
- Serpent Cipher Methods
- String Methods
- Timing Methods
- Token Methods
- TwoFish Cipher Methods
- Version Methods
- XML Parser Methods
- Zip Entropy Methods

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 512-bit digest of a string.

      #include <stdio.h>
      #include <wizard/WizardsToolkit.h>

      int main(int argc,char **argv)
      {
        HashInfo
          *hash_info;

        StringInfo
          *content;

        WizardsToolkitGenesis(*argv);
        hash_info=AcquireHashInfo(SHA512Hash);
        InitializeHash(hash_info);
        content=StringToStringInfo("The Wizard's Toolkit");
        UpdateHash(hash_info,content);
        FinalizeHash(hash_info);
        PrintStringInfo("Content",content);
        PrintStringInfo("Digest",GetHashDigest(hash_info));
        DestroyHashInfo(hash_info);
        DestroyStringInfo(content);
        WizardsToolkitTerminus();
        return(0);
      }

Discourse Server