Botan  2.4.0
Crypto and TLS for C++11
mp_types.h
Go to the documentation of this file.
1 /*
2 * Low Level MPI Types
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7 
8 #ifndef BOTAN_MPI_TYPES_H_
9 #define BOTAN_MPI_TYPES_H_
10 
11 #include <botan/types.h>
12 
13 namespace Botan {
14 
15 #if (BOTAN_MP_WORD_BITS == 8)
16  typedef uint8_t word;
17 #elif (BOTAN_MP_WORD_BITS == 16)
18  typedef uint16_t word;
19 #elif (BOTAN_MP_WORD_BITS == 32)
20  typedef uint32_t word;
21 #elif (BOTAN_MP_WORD_BITS == 64)
22  typedef uint64_t word;
23 #else
24  #error BOTAN_MP_WORD_BITS must be 8, 16, 32, or 64
25 #endif
26 
27 const word MP_WORD_MASK = ~static_cast<word>(0);
28 const word MP_WORD_TOP_BIT = static_cast<word>(1) << (8*sizeof(word) - 1);
30 
31 }
32 
33 #endif
Definition: alg_id.cpp:13
const word MP_WORD_MASK
Definition: mp_types.h:27
const word MP_WORD_MAX
Definition: mp_types.h:29
const word MP_WORD_TOP_BIT
Definition: mp_types.h:28