Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
md5.h
Go to the documentation of this file.
1 #ifndef MD5_H
2 #define MD5_H
3 
4 /* The following tests optimise behaviour on little-endian
5  machines, where there is no need to reverse the byte order
6  of 32 bit words in the MD5 computation. By default,
7  HIGHFIRST is defined, which indicates we're running on a
8  big-endian (most significant byte first) machine, on which
9  the byteReverse function in md5.c must be invoked. However,
10  byteReverse is coded in such a way that it is an identity
11  function when run on a little-endian machine, so calling it
12  on such a platform causes no harm apart from wasting time.
13  If the platform is known to be little-endian, we speed
14  things up by undefining HIGHFIRST, which defines
15  byteReverse as a null macro. Doing things in this manner
16  insures we work on new platforms regardless of their byte
17  order. */
18 
19 /* Code adapted by Michele Bosi for Visualization Library */
20 
21 #define HIGHFIRST
22 
23 #ifdef __i386__
24 #undef HIGHFIRST
25 #endif
26 
27 /* On machines where "long" is 64 bits, we need to declare
28  uint32 as something guaranteed to be 32 bits. */
29 
30 // modification for Visualization Library:
31 //#ifdef __alpha
32 //typedef unsigned int uint32;
33 //#elif !defined(__APPLE__)
34 //typedef unsigned long uint32;
35 //#endif
36 #ifdef __alpha
37 typedef unsigned int uint32;
38 #elif defined(__APPLE__)
39 typedef uint32_t uint32;
40 #else
41 typedef unsigned long uint32;
42 #endif
43 
44 struct MD5Context {
45  uint32 buf[4];
47  unsigned char in[64];
48 };
49 
50 /*
51  * This is needed to make RSAREF happy on some MS-DOS compilers.
52  */
53 typedef struct MD5Context MD5_CTX;
54 
55 /* Define CHECK_HARDWARE_PROPERTIES to have main,c verify
56  byte order and uint32 settings. */
57 #define CHECK_HARDWARE_PROPERTIES
58 
59 #endif /* !MD5_H */
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: md5.h:34
Definition: md5.h:44
unsigned long uint32
Definition: md5.h:41
GLuint in
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits