mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
More pgcrypto fixes: avoid bogus alignment assumptions in sha2,
be more wary about having a value for BYTE_ORDER, clean up randomly- chosen ways of including Postgres core headers. Marko Kreen and Tom Lane
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
/* $PostgreSQL: pgsql/contrib/pgcrypto/md5.c,v 1.12 2004/08/29 16:43:05 tgl Exp $ */
|
||||
/* $KAME: md5.c,v 1.3 2000/02/22 14:01:17 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -28,13 +27,22 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $PostgreSQL: pgsql/contrib/pgcrypto/md5.c,v 1.13 2005/07/11 15:07:59 tgl Exp $
|
||||
*/
|
||||
|
||||
#include "postgres.h"
|
||||
#include "px.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#include "px.h"
|
||||
#include "md5.h"
|
||||
|
||||
/* sanity check */
|
||||
#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
|
||||
#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#define SHIFT(X, s) (((X) << (s)) | ((X) >> (32 - (s))))
|
||||
|
||||
#define F(X, Y, Z) (((X) & (Y)) | ((~X) & (Z)))
|
||||
|
Reference in New Issue
Block a user