--- pgp/src/mpiio.h 2018/04/24 16:37:53 1.1.1.1 +++ pgp/src/mpiio.h 2018/04/24 16:45:39 1.1.1.8 @@ -23,21 +23,17 @@ /*--------------------- Byte ordering stuff -------------------*/ +/* XLOWFIRST is defined iff external file format is LSB-first byteorder */ +/* #define XLOWFIRST */ /* defined if external byteorder is LSB-first */ + #ifdef NEEDSWAP #undef NEEDSWAP /* make sure NEEDSWAP is initially undefined */ #endif -#ifdef XLOWFIRST -#ifdef HIGHFIRST -#define NEEDSWAP /* External/internal byteorder differs, need byte swap */ -#endif -#endif - -#ifndef XLOWFIRST +/* Assume MSB external byte ordering */ #ifndef HIGHFIRST #define NEEDSWAP /* External/internal byteorder differs, need byte swap */ #endif -#endif word16 fetch_word16(byte *buf); @@ -73,9 +69,6 @@ byte *put_word32(word32 w, byte *buf); #include -#define fill0(buffer,count) memset( buffer, 0, count ) - /* Zero-fill the byte buffer. */ - #ifdef EMBEDDED int putchar(int c); /* standard C library function from */ #endif /* EMBEDDED */ @@ -87,12 +80,9 @@ int str2reg(unitptr reg,string digitstr) /* Converts a possibly-signed digit string into a large binary number. Returns assumed radix, derived from suffix 'h','o',b','.' */ -void putstr(string s); /* Put out null-terminated ASCII string via putchar. */ -void puthexbyte(byte b); /* Put out byte in ASCII hex via putchar. */ -void puthexw16(word16 w); /* Put out 16-bit word in hex, high byte first. */ - int display_in_base(string s,unitptr n,short radix); - /* Display n in any base, such as base 10. Returns number of digits. */ + /* Display n in any base, such as base 10. Returns number + of digits. */ void mp_display(string s,unitptr r); /* Display register r in hex, with prefix string s. */ @@ -107,19 +97,12 @@ void hiloswap(byteptr r1,short numbytes) /* Reverses the order of bytes in an array of bytes. */ short mpi2reg(register unitptr r, register byteptr buf); - /* Converts to unit array from byte array with bit length prefix word. */ + /* Converts to unit array from byte array with bit length prefix + word. */ short reg2mpi(register byteptr buf, register unitptr r); - /* Converts from unit array to byte array with bit length prefix word. */ - -short preblock(unitptr outreg, byteptr inbuf, short bytecount, - unitptr modulus, byteptr randompad); - /* Converts plaintext block into form suitable for RSA encryption. */ - -short postunblock(byteptr outbuf, unitptr inreg, unitptr modulus); - /* Converts a just-decrypted RSA block back - into unblocked plaintext form. */ - + /* Converts from unit array to byte array with bit length prefix + word. */ /****************** end of MPI I/O library ************************/