/*************************************************
* Low Level MPI Types Header File                *
* (C) 1999-2003 The Botan Project                *
*************************************************/

#ifndef BOTAN_MPI_TYPES_H__
#define BOTAN_MPI_TYPES_H__

#include <botan/config.h>
#include <botan/types.h>

namespace Botan {

#if (MP_WORD_BITS == 8)
  typedef byte word;

  const word MP_WORD_MAX     = 0xFF;
  const word MP_WORD_TOP_BIT = 0x80;
#elif (MP_WORD_BITS == 16)
  typedef u16bit word;

  const word MP_WORD_MAX     = 0xFFFF;
  const word MP_WORD_TOP_BIT = 0x8000;
#elif (MP_WORD_BITS == 32)
  typedef u32bit word;

  const word MP_WORD_MAX     = 0xFFFFFFFF;
  const word MP_WORD_TOP_BIT = 0x80000000;
#elif (MP_WORD_BITS == 64)
  typedef u64bit word;

  const word MP_WORD_MAX     = 0xFFFFFFFFFFFFFFFF;
  const word MP_WORD_TOP_BIT = 0x8000000000000000;
#else
  #error MP_WORD_BITS must be 8, 16, 32, or 64
#endif

}

#endif
