1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

cipher reorganisiert

This commit is contained in:
Werner Koch 1998-04-07 18:16:10 +00:00
parent 53a578711f
commit 86f261dbc5
36 changed files with 760 additions and 939 deletions

View file

@ -1,3 +1,8 @@
Mon Apr 6 12:38:52 1998 Werner Koch (wk@isil.d.shuttle.de)
* mpicoder.c (mpi_get_buffer): Removed returned leading zeroes
and changed all callers.
Tue Mar 10 13:40:34 1998 Werner Koch (wk@isil.d.shuttle.de)
* mpi-bit.c (mpi_clear_highbit): New.

View file

@ -54,8 +54,6 @@ mpi_write( IOBUF out, MPI a )
iobuf_put(out, (nbits) );
p = buf = mpi_get_buffer( a, &n, NULL );
for( ; !*p && n; p++, n-- )
;
rc = iobuf_write( out, p, n );
m_free(buf);
return rc;
@ -302,6 +300,13 @@ mpi_get_buffer( MPI a, unsigned *nbytes, int *sign )
#error please implement for this limb size.
#endif
}
/* this is sub-optimal but we need to do the shift oepration because
* the caller has to free the returned buffer */
for(p=buffer; !*p && *nbytes; p++, --*nbytes )
;
if( p != buffer )
memmove(buffer,p, *nbytes);
return buffer;
}