comparison mycrypt_cfg.h @ 0:d7da3b1e1540 libtomcrypt

put back the 0.95 makefile which was inadvertently merged over
author Matt Johnston <matt@ucc.asn.au>
date Mon, 31 May 2004 18:21:40 +0000
parents
children 5d99163f7e32
comparison
equal deleted inserted replaced
-1:000000000000 0:d7da3b1e1540
1 /* This is the build config file.
2 *
3 * With this you can setup what to inlcude/exclude automatically during any build. Just comment
4 * out the line that #define's the word for the thing you want to remove. phew!
5 */
6
7 #ifndef MYCRYPT_CFG_H
8 #define MYCRYPT_CFG_H
9
10 /* you can change how memory allocation works ... */
11 extern void *XMALLOC(size_t n);
12 extern void *REALLOC(void *p, size_t n);
13 extern void *XCALLOC(size_t n, size_t s);
14 extern void XFREE(void *p);
15
16 /* change the clock function too */
17 extern clock_t XCLOCK(void);
18
19 /* ch1-01-1 */
20 /* type of argument checking, 0=default, 1=fatal and 2=none */
21 #define ARGTYPE 0
22 /* ch1-01-1 */
23
24 /* Controls endianess and size of registers. Leave uncommented to get platform neutral [slower] code */
25 /* detect x86-32 machines somewhat */
26 #if defined(INTEL_CC) || (defined(_MSC_VER) && defined(WIN32)) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__)))
27 #define ENDIAN_LITTLE
28 #define ENDIAN_32BITWORD
29 #endif
30
31 /* detects MIPS R5900 processors (PS2) */
32 #if (defined(__R5900) || defined(R5900) || defined(__R5900__)) && (defined(_mips) || defined(__mips__) || defined(mips))
33 #define ENDIAN_LITTLE
34 #define ENDIAN_64BITWORD
35 #endif
36
37 /* #define ENDIAN_LITTLE */
38 /* #define ENDIAN_BIG */
39
40 /* #define ENDIAN_32BITWORD */
41 /* #define ENDIAN_64BITWORD */
42
43 #if (defined(ENDIAN_BIG) || defined(ENDIAN_LITTLE)) && !(defined(ENDIAN_32BITWORD) || defined(ENDIAN_64BITWORD))
44 #error You must specify a word size as well as endianess in mycrypt_cfg.h
45 #endif
46
47 #if !(defined(ENDIAN_BIG) || defined(ENDIAN_LITTLE))
48 #define ENDIAN_NEUTRAL
49 #endif
50
51 #ifdef YARROW
52 #ifndef CTR
53 #error YARROW requires CTR chaining mode to be defined!
54 #endif
55 #endif
56
57 /* packet code */
58 #if defined(MRSA) || defined(MDH) || defined(MECC)
59 #define PACKET
60
61 /* size of a packet header in bytes */
62 #define PACKET_SIZE 4
63
64 /* Section tags */
65 #define PACKET_SECT_RSA 0
66 #define PACKET_SECT_DH 1
67 #define PACKET_SECT_ECC 2
68 #define PACKET_SECT_DSA 3
69
70 /* Subsection Tags for the first three sections */
71 #define PACKET_SUB_KEY 0
72 #define PACKET_SUB_ENCRYPTED 1
73 #define PACKET_SUB_SIGNED 2
74 #define PACKET_SUB_ENC_KEY 3
75 #endif
76
77 #endif /* MYCRYPT_CFG_H */
78