monotone

monotone Mtn Source Tree

Root/botan/mp_types.h

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

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status