API Tutorial: Development of a Sample Application

This tutorial deals with one of the sample applications that are provided with ProtectToolkit-C, namely frcypt.

The frcypt application enables files to be encrypted for a given recipient and then decrypted by that recipient.  Since the encrypted file contains a message authentication code (MAC), the recipient of a document will also be able to verify that the encrypted file was not modified.

In order to follow this example effectively, the reader is strongly encouraged to open or print the source of the application as a reference.  The source code for fcrypt can be found in the file fcrypt.c within your chosen install directory.

NOTE   To avoid running into issues, move samples out of the installation directory before modifying, compiling, or running them.

This tutorial contains the following sections:

1.Required Header Files

2.Runtime Switches

3.Encrypt Functions

4.Decrypt Function

5.fcrypt Usage

6.Wrapped Encryption Key Template

7.Assembling the Application