* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+/* This software has been altered by GROMACS for its use, including
+ * the use of GMX_INTEGER_BIG_ENDIAN, and the renaming of the
+ * functions md5_init, md5_append and md5_finish to have a gmx_ prefix
+ * (to avoid name clashes). */
+#include "gmxpre.h"
+
+#include "config.h"
#ifdef GMX_INTEGER_BIG_ENDIAN
#define ARCH_IS_BIG_ENDIAN 1
*/
#include "md5.h"
+
#include <string.h>
#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
#else
/* Define storage for little-endian or both types of CPUs. */
md5_word_t xbuf[16];
- /* cppcheck-suppress unassignedVariable */
const md5_word_t *X;
#endif
}
void
-md5_init(md5_state_t *pms)
+gmx_md5_init(md5_state_t *pms)
{
pms->count[0] = pms->count[1] = 0;
pms->abcd[0] = 0x67452301;
}
void
-md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
+gmx_md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
{
const md5_byte_t *p = data;
int left = nbytes;
}
void
-md5_finish(md5_state_t *pms, md5_byte_t digest[16])
+gmx_md5_finish(md5_state_t *pms, md5_byte_t digest[16])
{
static const md5_byte_t pad[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
}
/* Pad to 56 bytes mod 64. */
- md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
+ gmx_md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
/* Append the length. */
- md5_append(pms, data, 8);
+ gmx_md5_append(pms, data, 8);
for (i = 0; i < 16; ++i)
{
digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));