summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1999-01-07 18:05:48 +0100
committerWerner Koch <wk@gnupg.org>1999-01-07 18:05:48 +0100
commit7d0efec7cf5ae110c99511abc32587ff0c45b14f (patch)
treec25f43c0b175ca31c84da4e9a256b259ea070fc7 /include
parentSee ChangeLog: Sun Jan 3 15:28:44 CET 1999 Werner Koch (diff)
downloadgnupg2-7d0efec7cf5ae110c99511abc32587ff0c45b14f.tar.xz
gnupg2-7d0efec7cf5ae110c99511abc32587ff0c45b14f.zip
See ChangeLog: Thu Jan 7 18:00:58 CET 1999 Werner Koch
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/cipher.h12
-rw-r--r--include/mpi.h1
3 files changed, 10 insertions, 7 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index e5452d76f..bfe4dfe98 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jan 7 18:00:58 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.h (MD_BUFFER_SIZE): Removed.
+
Mon Dec 14 21:18:49 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
* types.h: fix for SUNPRO_C
diff --git a/include/cipher.h b/include/cipher.h
index 38050efa5..9cd5b5f3c 100644
--- a/include/cipher.h
+++ b/include/cipher.h
@@ -75,15 +75,13 @@ struct cipher_handle_s { char does_not_matter[1]; };
#define CIPHER_MODE_AUTO_CFB 4
#define CIPHER_MODE_DUMMY 5 /* used with algo DUMMY for no encryption */
-
-#define MD_BUFFER_SIZE 512
-
typedef struct {
- byte buffer[MD_BUFFER_SIZE];
- int bufcount;
int secure;
FILE *debug;
struct md_digest_list_s *list;
+ int bufcount;
+ int bufsize;
+ byte buffer[1];
} *MD_HANDLE;
@@ -118,9 +116,9 @@ const byte *md_asn_oid( int algo, size_t *asnlen, size_t *mdlen );
void md_start_debug( MD_HANDLE a, const char *suffix );
void md_stop_debug( MD_HANDLE a );
#define md_is_secure(a) ((a)->secure)
-#define md_putc(h,c) \
+#define md_putc(h,c) \
do { \
- if( (h)->bufcount == MD_BUFFER_SIZE ) \
+ if( (h)->bufcount == (h)->bufsize ) \
md_write( (h), NULL, 0 ); \
(h)->buffer[(h)->bufcount++] = (c) & 0xff; \
} while(0)
diff --git a/include/mpi.h b/include/mpi.h
index 6fbed3764..266b91554 100644
--- a/include/mpi.h
+++ b/include/mpi.h
@@ -158,6 +158,7 @@ void mpi_putbyte( MPI a, unsigned index, int value );
unsigned mpi_trailing_zeros( MPI a );
/*-- mpi-bit.c --*/
+void mpi_normalize( MPI a );
unsigned mpi_get_nbits( MPI a );
int mpi_test_bit( MPI a, unsigned n );
void mpi_set_bit( MPI a, unsigned n );