blob: 81b6d73959a733ed78bbb274861ba6c220bec5b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*************************************************
* Low Level MPI Types Header File *
* (C) 1999-2007 Jack Lloyd *
*************************************************/
#ifndef BOTAN_MPI_TYPES_H__
#define BOTAN_MPI_TYPES_H__
#include <botan/types.h>
namespace Botan {
#if (BOTAN_MP_WORD_BITS == 8)
typedef byte word;
#elif (BOTAN_MP_WORD_BITS == 16)
typedef u16bit word;
#elif (BOTAN_MP_WORD_BITS == 32)
typedef u32bit word;
#elif (BOTAN_MP_WORD_BITS == 64)
typedef u64bit word;
#else
#error BOTAN_MP_WORD_BITS must be 8, 16, 32, or 64
#endif
const word MP_WORD_MASK = ~static_cast<word>(0);
const word MP_WORD_TOP_BIT = static_cast<word>(1) << (8*sizeof(word) - 1);
const word MP_WORD_MAX = MP_WORD_MASK;
}
#endif
|