Botan 1.10.17
gmp_wrap.h
Go to the documentation of this file.
1/*
2* GMP MPZ Wrapper
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_GMP_MPZ_WRAP_H__
9#define BOTAN_GMP_MPZ_WRAP_H__
10
11#include <botan/bigint.h>
12#include <gmp.h>
13
14namespace Botan {
15
16/**
17* Lightweight GMP mpz_t wrapper. For internal use only.
18*/
20 {
21 public:
22 mpz_t value;
23
24 BigInt to_bigint() const;
25 void encode(byte[], size_t) const;
26 size_t bytes() const;
27
30
31 GMP_MPZ& operator=(const GMP_MPZ&);
32
33 GMP_MPZ(const GMP_MPZ&);
34 GMP_MPZ(const BigInt& = 0);
35 GMP_MPZ(const byte[], size_t);
36 ~GMP_MPZ();
37 };
38
39}
40
41#endif
static SecureVector< byte > encode(const BigInt &n, Base base=Binary)
Definition big_code.cpp:64
size_t bytes() const
Definition gmp_wrap.cpp:78
SecureVector< byte > to_bytes() const
Definition gmp_wrap.h:28
GMP_MPZ(const GMP_MPZ &)
Definition gmp_wrap.cpp:44
void encode(byte[], size_t) const
Definition gmp_wrap.cpp:69
BigInt to_bigint() const
Definition gmp_wrap.cpp:86
GMP_MPZ & operator=(const GMP_MPZ &)
Definition gmp_wrap.cpp:60