This page contains the following errors:

error on line 207 at column 173: Premature end of data in tag tr line 206

Below is a rendering of the page up to the first error.

git.saurik.com Git - apple/security.git/blame - SecurityTests/cspxutils/utilLib/bsafeUtils.h
Security-57337.40.85.tar.gz
[apple/security.git] / SecurityTests / cspxutils / utilLib / bsafeUtils.h
CommitLineData
d8f41ccd
A
1/*
2 * bsafeUtils.h - common routines for CDSA/BSAFE compatibility testing
3 */
4
5/*
6 * Clients of this module do not need to know about or see anything from the
7 * BSAFE headers.
8 */
9#ifndef _BSAFE_UTILS_H_
10#define _BSAFE_UTILS_H_
11#include <Security/cssmtype.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/* Actually the same as a B_KEY_OBJ, but our callers don't need to know that */
18typedef void *BU_KEY;
19
20/*
21 * Create a symmetric key.
22 */
23CSSM_RETURN buGenSymKey(
24 uint32 keySizeInBits,
25 const CSSM_DATA *keyData,
26 BU_KEY *key); // RETURNED
27
28/*
29 * Create asymmetric key pair.
30 * FIXME - additional params (e.g. DSA params, RSA exponent)?
31 */
32CSSM_RETURN buGenKeyPair(
33 uint32 keySizeInBits,
34 CSSM_ALGORITHMS keyAlg, // CSSM_ALGID_{RSA,DSA}
35 BU_KEY *pubKey, // RETURNED
36 BU_KEY *privKey); // RETURNED
37
38/*
39 * Free a key created in buGenSymKey or buGenKeyPair
40 */
41CSSM_RETURN buFreeKey(
42 BU_KEY key);
43
44/*
45 * encrypt/decrypt
46 */
47CSSM_RETURN buEncryptDecrypt(
48 BU_KEY key,
49 CSSM_BOOL forEncrypt,
50 CSSM_ALGORITHMS encrAlg,
51 CSSM_ENCRYPT_MODE mode, // CSSM_ALGMODE_CBC, etc.
52