- E539EF777487B66317CD23B7D19F883A9BAB67A9CB984DFB5D1A5DF4575A66CB44B7EC199AC0829B1270EDFA68F182D646CE944C14F5C401654E1E0F68271BAF
+ 0BC1BE9F757231B114821A55B106387358B919237DCEDC3C4F23C0DF61F7ACD00656CEFBA6A48313304FCFBCE2ABF528EC2FBA998C0F67784DE486D00B8F6CC2
mpi/include/mpi.h
(1 . 47)(1 . 36)
710 /* mpi.h - Multi Precision Integers
711 * Copyright (C) 1994, 1996, 1998, 1999,
712 * 2000, 2001 Free Software Foundation, Inc.
713 * Modified by No Such Labs. (C) 2015. See README.
714 *
715 * This file is part of GNUPG.
716 * This file was originally part of Gnu Privacy Guard (GPG), ver. 1.4.10,
717 * SHA256(gnupg-1.4.10.tar.gz):
718 * 0bfd74660a2f6cedcf7d8256db4a63c996ffebbcdc2cf54397bfb72878c5a85a
719 * (C) 1994-2005 Free Software Foundation, Inc.
720 *
721 * GNUPG is free software; you can redistribute it and/or modify
722 * This program is free software: you can redistribute it and/or modify
723 * it under the terms of the GNU General Public License as published by
724 * the Free Software Foundation; either version 3 of the License, or
725 * the Free Software Foundation, either version 3 of the License, or
726 * (at your option) any later version.
727 *
728 * GNUPG is distributed in the hope that it will be useful,
729 * This program is distributed in the hope that it will be useful,
730 * but WITHOUT ANY WARRANTY; without even the implied warranty of
731 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
732 * GNU General Public License for more details.
733 *
734 * You should have received a copy of the GNU General Public License
735 * along with this program; if not, see <http://www.gnu.org/licenses/>.
736 *
737 * Note: This code is heavily based on the GNU MP Library.
738 * Actually it's the same code with only minor changes in the
739 * way the data is stored; this is to support the abstraction
740 * of an optional secure memory allocation which may be used
741 * to avoid revealing of sensitive data due to paging etc.
742 * The GNU MP Library itself is published under the LGPL;
743 * however I decided to publish this code under the plain GPL.
744 * along with this program. If not, see <http://www.gnu.org/licenses/>.
745 */
746
747 #ifndef G10_MPI_H
748 #define G10_MPI_H
749
750 #include <config.h>
751 #include <stdio.h>
752 #include "iobuf.h"
753 #include "knobs.h"
754 #include "types.h"
755 #include "memory.h"
756
757 #ifndef EXTERN_UNLESS_MAIN_MODULE
758 #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
759 #define EXTERN_UNLESS_MAIN_MODULE extern
760 #else
761 #define EXTERN_UNLESS_MAIN_MODULE
762 #endif
763 #endif
764
765 #define DBG_MPI mpi_debug_mode
766 EXTERN_UNLESS_MAIN_MODULE int mpi_debug_mode;
(92 . 18)(81 . 10)
768 unsigned int mpi_get_flags (MPI a);
769
770 /*-- mpicoder.c --*/
771 int mpi_write( IOBUF out, MPI a );
772 #ifdef M_DEBUG
773 #define mpi_read(a,b,c) mpi_debug_read((a),(b),(c), M_DBGINFO( __LINE__ ) )
774 MPI mpi_debug_read(IOBUF inp, unsigned *nread, int secure, const char *info);
775 #else
776 MPI mpi_read(IOBUF inp, unsigned *nread, int secure);
777 #endif
778 MPI mpi_read_from_buffer(byte *buffer, unsigned *ret_nread, int secure);
779 int mpi_fromstr(MPI val, const char *str);
780 int mpi_print( FILE *fp, MPI a, int mode );
781 void g10_log_mpidump( const char *text, MPI a );
782 u32 mpi_get_keyid( MPI a, u32 *keyid );
783 //void g10_log_mpidump( const char *text, MPI a );
784 byte *mpi_get_buffer( MPI a, unsigned *nbytes, int *sign );
785 byte *mpi_get_secure_buffer( MPI a, unsigned *nbytes, int *sign );
786 void mpi_set_buffer( MPI a, const byte *buffer, unsigned nbytes, int sign );