summaryrefslogtreecommitdiff
path: root/lib/md5.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-10-24 03:02:57 +0000
committerJim Meyering <jim@meyering.net>1996-10-24 03:02:57 +0000
commitdb69dbe9ab0daa14fb67c7925dec0ad5aaafc578 (patch)
treefc0b54fd1396ae696e4a2616e9473dd65afc0870 /lib/md5.c
parent4215f6b53a39e76c0371bb78eb26aa9037c6383f (diff)
downloadcoreutils-db69dbe9ab0daa14fb67c7925dec0ad5aaafc578.tar.xz
Update from GNU libc.
Diffstat (limited to 'lib/md5.c')
-rw-r--r--lib/md5.c44
1 files changed, 25 insertions, 19 deletions
diff --git a/lib/md5.c b/lib/md5.c
index 0b54898dd..d7b0f0e38 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -1,24 +1,24 @@
/* md5.c - Functions to compute MD5 message digest of files or memory blocks
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+ according to the definition of MD5 in RFC 1321 from April 1992.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>. */
+/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -72,8 +72,11 @@ md5_init_ctx (ctx)
ctx->buflen = 0;
}
-/* Put result from CTX in first 16 bytes following RESBUF. The result must
- be in little endian byte order. */
+/* Put result from CTX in first 16 bytes following RESBUF. The result
+ must be in little endian byte order.
+
+ IMPORTANT: On some systems it is required that RESBUF is correctly
+ aligned for a 32 bits value. */
void *
md5_read_ctx (ctx, resbuf)
const struct md5_ctx *ctx;
@@ -88,7 +91,10 @@ md5_read_ctx (ctx, resbuf)
}
/* Process the remaining bytes in the internal buffer and the usual
- prolog according to the standard and write the result to RESBUF. */
+ prolog according to the standard and write the result to RESBUF.
+
+ IMPORTANT: On some systems it is required that RESBUF is correctly
+ aligned for a 32 bits value. */
void *
md5_finish_ctx (ctx, resbuf)
struct md5_ctx *ctx;