]> git.saurik.com Git - apple/security.git/blame - SecurityTests/cspxutils/EXAMPLES_README
Security-57337.40.85.tar.gz
[apple/security.git] / SecurityTests / cspxutils / EXAMPLES_README
CommitLineData
d8f41ccd
A
1 CDSA Sample Code Info
2 last update 4/24/02 dmitch
3
4Introduction
5------------
6This directory contains three programs which demonstrate how to
7write code using the Common Data Security Architecture (CDSA)
8API.
9
10Building
11--------
12
13To build all of the examples, open a Terminal window, cd to the
14CDSA_Examples directory, and type 'make'. If the LOCAL_BUILD_DIR
15environment variable is set, the executables are placed there;
16otherwise they are built in place in the respective directories.
17
18Source code
19-----------
20There are four directories in this package. Three contain the
21source for three executables themselves - rsatool, dhTest, and
22cryptTool. The fourth is utilLib, which contains a superset of
23the code which the three examples need to link against. The only
24two files in utilLib of interest for the purpose of these example are:
25
26common.c - setup and initialize CSSM and CSP (see cspDlDbStartup())
27cspwrap.c - wrapper functions for some of the crypto operations,
28like generate key pair (cspGenKeyPair()), encryption
29(cspEncrypt()), and decryption (cspDecrypt()).
30
31See the README files in the respective directories for more
32information.
33