diff options
author | Jim Meyering <meyering@redhat.com> | 2008-01-31 13:51:10 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-01-31 14:45:02 +0100 |
commit | 1d6931a643e826cc18cf040a992d23bb5e2af003 (patch) | |
tree | 1271af281d43313213abaecc9a8c033af21ffa80 /lib/sha512.h | |
parent | ffd3ba280554960db57bd8f949c72463536eab2a (diff) | |
download | coreutils-1d6931a643e826cc18cf040a992d23bb5e2af003.tar.xz |
Remove alignment constraint from the sha*_read_ctx functions.
* lib/sha256.c (set_uint32): New function.
(sha256_read_ctx, sha224_read_ctx): Use it.
* lib/sha512.c (set_uint64): New function.
(sha512_read_ctx, sha384_read_ctx): Use it.
* lib/sha256.h: Remove warning about alignment constraint.
* lib/sha512.h: Likewise.
Prompted by similar changes in gnulib's sha1 and md[45] modules.
Diffstat (limited to 'lib/sha512.h')
-rw-r--r-- | lib/sha512.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/sha512.h b/lib/sha512.h index cc321650c..7ee3ac4f8 100644 --- a/lib/sha512.h +++ b/lib/sha512.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA512 and SHA384 sum library functions. - Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,10 +54,7 @@ extern void sha512_process_bytes (const void *buffer, size_t len, /* Process the remaining bytes in the buffer and put result from CTX in first 64 (48) bytes following RESBUF. 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. - - IMPORTANT: On some systems it is required that RESBUF be correctly - aligned for a 64 bits value. */ + ASCII representation of the message digest. */ extern void *sha512_finish_ctx (struct sha512_ctx *ctx, void *resbuf); extern void *sha384_finish_ctx (struct sha512_ctx *ctx, void *resbuf); |