Check whether `-fgnu89-inline' is supported before using it.
[gnutls.git] / lib / gnutls_mpi.h
blobd0b7d3c97574b9481a0114173f46a180df7f774e
1 /*
2 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation
4 * Author: Nikos Mavrogiannopoulos
6 * This file is part of GNUTLS.
8 * The GNUTLS library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21 * USA
25 #ifndef GNUTLS_MPI_H
26 # define GNUTLS_MPI_H
28 # include <gnutls_int.h>
29 # include <gcrypt.h>
30 # include <gc.h>
31 # include <libtasn1.h>
33 typedef gcry_mpi_t mpi_t;
35 #define _gnutls_mpi_cmp gcry_mpi_cmp
36 #define _gnutls_mpi_cmp_ui gcry_mpi_cmp_ui
37 #define _gnutls_mpi_mod gcry_mpi_mod
38 #define _gnutls_mpi_new gcry_mpi_new
39 #define _gnutls_mpi_snew gcry_mpi_snew
40 #define _gnutls_mpi_copy gcry_mpi_copy
41 #define _gnutls_mpi_set_ui gcry_mpi_set_ui
42 #define _gnutls_mpi_set gcry_mpi_set
43 #define _gnutls_mpi_randomize gcry_mpi_randomize
44 #define _gnutls_mpi_get_nbits gcry_mpi_get_nbits
45 #define _gnutls_mpi_powm gcry_mpi_powm
46 #define _gnutls_mpi_invm gcry_mpi_invm
47 #define _gnutls_mpi_addm gcry_mpi_addm
48 #define _gnutls_mpi_subm gcry_mpi_subm
49 #define _gnutls_mpi_sub_ui gcry_mpi_sub_ui
50 #define _gnutls_mpi_mulm gcry_mpi_mulm
51 #define _gnutls_mpi_mul gcry_mpi_mul
52 #define _gnutls_mpi_add gcry_mpi_add
53 #define _gnutls_mpi_add_ui gcry_mpi_add_ui
54 #define _gnutls_mpi_sub_ui gcry_mpi_sub_ui
55 #define _gnutls_mpi_mul_ui gcry_mpi_mul_ui
56 #define _gnutls_prime_check gcry_prime_check
57 #define _gnutls_mpi_div gcry_mpi_div
59 # define _gnutls_mpi_alloc_like(x) _gnutls_mpi_new(_gnutls_mpi_get_nbits(x))
60 # define _gnutls_mpi_salloc_like(x) _gnutls_mpi_snew(_gnutls_mpi_get_nbits(x))
62 void _gnutls_mpi_release (mpi_t * x);
64 int _gnutls_mpi_scan_nz (mpi_t * ret_mpi, const opaque * buffer,
65 size_t * nbytes);
66 int _gnutls_mpi_scan (mpi_t * ret_mpi, const opaque * buffer,
67 size_t * nbytes);
68 int _gnutls_mpi_scan_pgp (mpi_t * ret_mpi, const opaque * buffer,
69 size_t * nbytes);
71 int _gnutls_mpi_print (void *buffer, size_t * nbytes, const mpi_t a);
72 int _gnutls_mpi_print_lz (void *buffer, size_t * nbytes, const mpi_t a);
74 int _gnutls_mpi_dprint_lz (gnutls_datum_t * dest, const mpi_t a);
75 int _gnutls_mpi_dprint (gnutls_datum_t * dest, const mpi_t a);
77 #endif