123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- #ifndef _MD5_H
- #define _MD5_H 1
- #include <stdio.h>
- #include <stdint.h>
- #define MD5_DIGEST_SIZE 16
- #define MD5_BLOCK_SIZE 64
- #ifndef __GNUC_PREREQ
- # if defined __GNUC__ && defined __GNUC_MINOR__
- # define __GNUC_PREREQ(maj, min) \
- ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
- # else
- # define __GNUC_PREREQ(maj, min) 0
- # endif
- #endif
- #ifndef __THROW
- # if defined __cplusplus && __GNUC_PREREQ (2,8)
- # define __THROW throw ()
- # else
- # define __THROW
- # endif
- #endif
- #ifndef _LIBC
- # define __md5_buffer md5_buffer
- # define __md5_finish_ctx md5_finish_ctx
- # define __md5_init_ctx md5_init_ctx
- # define __md5_process_block md5_process_block
- # define __md5_process_bytes md5_process_bytes
- # define __md5_read_ctx md5_read_ctx
- # define __md5_stream md5_stream
- #endif
- # ifdef __cplusplus
- extern "C" {
- # endif
- struct md5_ctx
- {
- uint32_t A;
- uint32_t B;
- uint32_t C;
- uint32_t D;
- uint32_t total[2];
- uint32_t buflen;
- uint32_t buffer[32];
- };
- extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW;
- extern void __md5_process_block (const void *buffer, size_t len,
- struct md5_ctx *ctx) __THROW;
- extern void __md5_process_bytes (const void *buffer, size_t len,
- struct md5_ctx *ctx) __THROW;
- extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW;
- extern void *__md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) __THROW;
- extern int __md5_stream (FILE *stream, void *resblock) __THROW;
- extern void *__md5_buffer (const char *buffer, size_t len,
- void *resblock) __THROW;
- # ifdef __cplusplus
- }
- # endif
- #endif /* md5.h */
|