Botan 1.10.17
mp_types.h
Go to the documentation of this file.
1/*
2* Low Level MPI Types
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_MPI_TYPES_H__
9#define BOTAN_MPI_TYPES_H__
10
11#include <botan/types.h>
12
13namespace Botan {
14
15#if (BOTAN_MP_WORD_BITS == 8)
16 typedef byte word;
17#elif (BOTAN_MP_WORD_BITS == 16)
18 typedef u16bit word;
19#elif (BOTAN_MP_WORD_BITS == 32)
20 typedef u32bit word;
21#elif (BOTAN_MP_WORD_BITS == 64)
22 typedef u64bit word;
23#else
24 #error BOTAN_MP_WORD_BITS must be 8, 16, 32, or 64
25#endif
26
27const word MP_WORD_MASK = ~static_cast<word>(0);
28const word MP_WORD_TOP_BIT = static_cast<word>(1) << (8*sizeof(word) - 1);
30
31}
32
33#endif
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
unsigned long long u64bit
Definition types.h:49
unsigned int u32bit
Definition types.h:32
unsigned short u16bit
Definition types.h:27