|
|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
/* md5.h - Declaration of functions and data types used for MD5 sum
|
|
|
|
|
computing library functions.
|
|
|
|
|
Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
|
|
|
|
|
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
|
|
|
|
NOTE: The canonical source of this file is maintained with the GNU C
|
|
|
|
|
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
|
|
|
|
|
|
|
|
|
@ -99,17 +99,26 @@ struct md5_ctx
|
|
|
|
|
(RFC 1321, 3.3: Step 3) */
|
|
|
|
|
extern void md5_init_ctx __P ((struct md5_ctx *ctx));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Starting with the result of former calls of this function (or the
|
|
|
|
|
initialization function update the context for the next LEN bytes
|
|
|
|
|
starting at BUFFER.
|
|
|
|
|
It is necessary that LEN is a multiple of 64!!! */
|
|
|
|
|
|
|
|
|
|
It is necessary that LEN is a multiple of 64!!!
|
|
|
|
|
|
|
|
|
|
IMPORTANT: On some systems it is required that buffer be 32-bit
|
|
|
|
|
aligned. */
|
|
|
|
|
extern void md5_process_block __P ((const void *buffer, size_t len,
|
|
|
|
|
struct md5_ctx *ctx));
|
|
|
|
|
|
|
|
|
|
/* Starting with the result of former calls of this function (or the
|
|
|
|
|
initialization function update the context for the next LEN bytes
|
|
|
|
|
initialization function) update the context for the next LEN bytes
|
|
|
|
|
starting at BUFFER.
|
|
|
|
|
It is NOT required that LEN is a multiple of 64. */
|
|
|
|
|
|
|
|
|
|
It is NOT required that LEN is a multiple of 64.
|
|
|
|
|
|
|
|
|
|
IMPORTANT: On some systems it is required that buffer be 32-bit
|
|
|
|
|
aligned. */
|
|
|
|
|
extern void md5_process_bytes __P ((const void *buffer, size_t len,
|
|
|
|
|
struct md5_ctx *ctx));
|
|
|
|
|
|
|
|
|
|
@ -127,20 +136,27 @@ extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
|
|
|
|
|
always in little endian byte order, so that a byte-wise output yields
|
|
|
|
|
to the wanted ASCII representation of the message digest.
|
|
|
|
|
|
|
|
|
|
IMPORTANT: On some systems it is required that RESBUF is correctly
|
|
|
|
|
IMPORTANT: On some systems it is required that RESBUF be correctly
|
|
|
|
|
aligned for a 32 bits value. */
|
|
|
|
|
extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Compute MD5 message digest for bytes read from STREAM. The
|
|
|
|
|
resulting message digest number will be written into the 16 bytes
|
|
|
|
|
beginning at RESBLOCK. */
|
|
|
|
|
beginning at RESBLOCK.
|
|
|
|
|
|
|
|
|
|
IMPORTANT: On some systems it is required that resblock be 32-bit
|
|
|
|
|
aligned. */
|
|
|
|
|
extern int md5_stream __P ((FILE *stream, void *resblock));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
|
|
|
|
|
result is always in little endian byte order, so that a byte-wise
|
|
|
|
|
output yields to the wanted ASCII representation of the message
|
|
|
|
|
digest. */
|
|
|
|
|
digest.
|
|
|
|
|
|
|
|
|
|
IMPORTANT: On some systems it is required that buffer and resblock
|
|
|
|
|
be correctly 32-bit aligned. */
|
|
|
|
|
extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|