Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _MD5_H
- #define _MD5_H 1
- #include <stdio.h>
- #if defined HAVE_LIMITS_H || _LIBC
- # include <limits.h>
- #endif
- #ifdef _LIBC
- # include <sys/types.h>
- typedef u_int32_t md5_uint32;
- #else
- # if defined __STDC__ && __STDC__
- # define UINT_MAX_32_BITS 4294967295U
- # else
- # define UINT_MAX_32_BITS 0xFFFFFFFF
- # endif
- # ifndef UINT_MAX
- # define UINT_MAX UINT_MAX_32_BITS
- # endif
- # if UINT_MAX == UINT_MAX_32_BITS
- typedef unsigned int md5_uint32;
- # else
- # if USHRT_MAX == UINT_MAX_32_BITS
- typedef unsigned short md5_uint32;
- # else
- # if ULONG_MAX == UINT_MAX_32_BITS
- typedef unsigned long md5_uint32;
- # else
- /* The following line is intended to evoke an error.
- Using #error is not portable enough. */
- "Cannot determine unsigned 32-bit data type."
- # endif
- # endif
- # endif
- #endif
- #undef __P
- #if defined (__STDC__) && __STDC__
- #define __P(x) x
- #else
- #define __P(x) ()
- #endif
- struct md5_ctx
- {
- md5_uint32 A;
- md5_uint32 B;
- md5_uint32 C;
- md5_uint32 D;
- md5_uint32 total[2];
- md5_uint32 buflen;
- char buffer[128];
- };
- extern void md5_init_ctx __P ((struct md5_ctx *ctx));
- extern void md5_process_block __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
- extern void md5_process_bytes __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
- extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
- extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
- extern int md5_stream __P ((FILE *stream, void *resblock));
- extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement