1.Dd April 5, 2007
2.Dt CC_crypto 3cc
3.Os
4.Sh NAME
5.Nm Common Crypto
6.Nd libSystem digest library
7.Sh DESCRIPTION
8The libSystem \fBCommon Crypto\fR library implements a wide range of cryptographic
9algorithms used in various Internet standards. The services provided
10by this library are used by the CDSA implementations of \s-1SSL\s0, \s-1TLS\s0
11and S/MIME.
12.Sh OVERVIEW
13\&\fBlibSystem\fR contains the Common Crypto collection of algorithms. Digest
14and encryption algorithms contained in this library are optimized for speed.
15The algorithms have been collected from various sources and chosen for their
16performance characteristics.  Since libSystem is linked into all executables
17it is preferable for applications to use these functions rather than
18implementing their own versions.
19.Sh NOTES
20To use the digest functions with existing code which uses
21the corresponding openssl functions, #define the symbol 
22COMMON_DIGEST_FOR_OPENSSL in your client code (BEFORE including
23.In CommonCrypto/CommonDigest.h
24).
25.Pp
26You can *NOT* mix and match functions operating on a given data
27type from the two implementations; i.e., if you do a 
28.Fn CC_MD5_Init
29on a 
30.Ft CC_MD5_CTX
31object, do not assume that you can do an openssl-style
32.Fn MD5_Update
33on that same context.
34.Pp
35The interfaces to the encryption and HMAC algorithms have a calling interface
36that is different from that provided by OpenSSL.
37.Sh HISTORY
38The Common Crypto collection of functions started to become available in OS X 10.4 and later.
39.Sh SEE ALSO
40.Xr CC_MD5 3cc ,
41.Xr CC_SHA 3cc ,
42.Xr CCHmac 3cc ,
43.Xr CCCryptor 3cc
44