summaryrefslogtreecommitdiff
path: root/lib/sha512.h
Commit message (Collapse)AuthorAgeFilesLines
* Add more reminders to include <config.h>.Bruno Haible2023-04-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/aligned-malloc.h: Check that config.h was already included. * lib/careadlinkat.h: Likewise. * lib/filemode.h: Likewise. * lib/freadptr.h: Likewise. * lib/fseterr.h: Likewise. * lib/glthread/lock.h: Likewise. * lib/glthread/tls.h: Likewise. * lib/immutable.h: Likewise. * lib/isapipe.h: Likewise. * lib/isnand-nolibm.h: Likewise. * lib/isnanf-nolibm.h: Likewise. * lib/isnanl-nolibm.h: Likewise. * lib/mbswidth.h: Likewise. * lib/md5.h: Likewise. * lib/minmax.h: Likewise. * lib/msvc-inval.h: Likewise. * lib/msvc-nothrow.h: Likewise. * lib/pathmax.h: Likewise. * lib/sha1.h: Likewise. * lib/sha256.h: Likewise. * lib/sha512.h: Likewise. * lib/size_max.h: Likewise. * lib/sm3.h: Likewise. * lib/stat-size.h: Likewise. * lib/termcap.h: Likewise. * lib/terminfo.h: Likewise. * lib/thread-optim.h: Likewise. * lib/unlocked-io.h: Likewise. * lib/vma-iter.h: Likewise.
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* af_alg: port to Ubuntu 22.04Paul Eggert2022-05-021-0/+3
| | | | | | | | | | | | | | | | | Without this patch, maintainer builds of coreutils fail on Ubuntu 22.04 with diagnostics like "./lib/gl_openssl.h:79:1: error: 'MD5_Init' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]". From <https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes> it appears that Gnulib needs to either define OPENSSL_API_COMPAT to a version less than 3.0, or use a compatibility layer, or assume OpenSSL 1.1.0 or later. The simplest workaround is to define OPENSSL_API_COMPAT for 1.1.1, the oldest OpenSSL release still supported. A better fix would be to rewrite the code to assume OpenSSL 1.1.1 or later, and stop using the older API. * lib/md5.h, lib/sha1.h, lib/sha256.h, lib/sha512.h, lib/sm3.h: Define OPENSSL_API_COMPAT to 0x10101000L to suppress the deprecation warnings on Ubuntu 22.04.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* sha512: Clarify module to source relation.Bruno Haible2021-09-191-0/+1
| | | | | | | | | | | | * lib/sha512-stream.c: New file, extracted from lib/sha512.c. * lib/sha512.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, shaxxx_stream, sha512_stream, sha384_stream): Moved to sha512-stream.c. * lib/sha512.h: Tweak. * modules/crypto/sha512 (Files): Add lib/sha512-stream.c. (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM. (Makefile.am): Arrange to compile sha512-stream.c. (Link): Mention $(LIB_CRYPTO).
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-041-7/+7
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* crypto/sha512-buffer: Use 'restrict'.Bruno Haible2020-02-231-8/+12
| | | | | | * lib/sha512.h (sha512_finish_ctx, sha384_finish_ctx, sha512_read_ctx, sha384_read_ctx, sha512_buffer, sha384_buffer): Use 'restrict'. * modules/crypto/sha512-buffer (configure.ac): Require AC_C_RESTRICT.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* af_alg: Fix bug with streams that are not at position 0.Bruno Haible2018-05-061-2/+5
| | | | | | | | | | | | * lib/af_alg.c (afalg_stream): Before sendfile, invoke fflush. Don't assume that the stream is positioned at position 0. * lib/af_alg.h (afalg_stream): Mention restriction regarding the state of the stream. * lib/md5.h (md5_stream): Likewise. * lib/sha1.h (sha1_stream): Likewise. * lib/sha256.h (sha256_stream, sha224_stream): Likewise. * lib/sha512.h (sha512_stream, sha384_stream): Likewise. * modules/crypto/af_alg (Depends-on): Add fflush, lseek.
* maint: Add encoding marker for Emacs to non-ASCII sources.Bruno Haible2018-01-051-0/+7
| | | | | | | | | | | | | | | | | | | Similar to commit f406941a8a2ec5fbf3eacc386b9be09d6593d53b from Paul Eggert <eggert@cs.ucla.edu> 2015-09-24. To determine the file list that need the marker, I used the command: for f in `find . -type f | grep -v '^\./\.git/' | grep -v '^\./tests/'`; do if iconv -f ASCII -t ASCII < $f > /dev/null 2>&1 ; then : ; else if iconv -f UTF-8 -t UTF-8 < $f > /dev/null 2>&1 ; then if grep 'The GNU C Library is' $f > /dev/null; then :; else if grep 'coding: utf-8' $f > /dev/null; then :; else echo $f fi fi fi fi done | LC_ALL=C sort
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* md5, sha1, sha256, sha512: Add comments regarding correctness.Bruno Haible2017-03-311-2/+2
| | | | | | | | | | | | * lib/md5.h (buflen): Add comments regarding range. * lib/sha1.h (buflen): Likewise. * lib/sha256.h (buflen): Likewise. * lib/sha512.h (buflen): Likewise. * lib/md5.c (md5_process_bytes): Add comment why memmove is not needed. * lib/sha1.c (sha1_process_bytes): Likewise. * lib/sha256.c (sha256_process_bytes): Likewise. * lib/sha512.c (sha512_process_bytes): Likewise. Reported by Coverity via Tim Rühsen.
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* md5, sha1, sha256, sha512: use openssl routines if availablePádraig Brady2013-12-031-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --with-openssl the libcrypto md5, sha1, sha224, sha256, sha384, sha256 routines will be used if available, requiring apps to link @LIB_CRYPTO@ * lib/gl_openssl.h: Provide wrappers for specified openssl hash. * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): New function to lookup libcrypto in the standard system location. * m4/sha1.m4: Call gl_CRYPTO_CHECK() for SHA1. * m4/sha256.m4: Likewise with SHA256. * m4/sha512.m4: Likewise with SHA512. * m4/md5.m4: Likewise with MD5. * m4/gc.m4: Ensure @LIB_CRYPTO@ set for tests. * lib/sha1.h: Include wrappers if HAVE_OPENSSL_SHA1. * lib/sha256.h: Likewise with SHA256. * lib/sha512.h: Likewise with SHA512. * lib/md5.h: Likewise with MD5. * lib/sha1.c: Exlude functionality if HAVE_OPENSSL_SHA1. * lib/sha256.c: Likewise with SHA256. * lib/sha512.c: Likewise with SHA512. * lib/md5.c: Likewise with MD5. * modules/crypto/sha1 (Link:): Add the new optional lib. (Depends-on:): Add dependency on extern-inline. * modules/crypto/sha256: Likewise. * modules/crypto/sha512: Likewise. * modules/crypto/md5: Likewise. * modules/crypto/sha1-tests: Reference the lib here too. * modules/crypto/md5-tests: Likewise. * modules/crypto/gc-des-tests: Likewise. * modules/crypto/gc-hmac-md5-tests: Likewise. * modules/crypto/gc-hmac-sha1-tests: Likewise. * modules/crypto/gc-hmac-sha256-tests: Likewise. * modules/crypto/gc-hmac-sha512-tests: Likewise. * modules/crypto/gc-md5-tests: Likewise. * modules/crypto/gc-pbkdf2-sha1-tests: Likewise. * modules/crypto/gc-sha1-tests: Likewise. * modules/crypto/gc-tests: Likewise. * modules/crypto/hmac-md5-tests: Likewise. * modules/crypto/hmac-sha1-tests: Likewise. * modules/crypto/hmac-sha256-tests: Likewise. * modules/crypto/hmac-sha512-tests: Likewise.
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-2/+2
|
* Update copyright year, for commit on 2009-07-21.Bruno Haible2009-08-011-1/+1
|
* C++: wrap md2,md5,sha1,etc. function declarations in extern "C" scopePeter Simons2009-07-221-0/+8
| | | | | | | | | * lib/md2.h [__cplusplus]: Wrap declarations in extern "C" scope. * lib/md4.h: Likewise. * lib/md5.h: Likewise. * lib/sha1.h: Likewise. * lib/sha256.h: Likewise. * lib/sha512.h: Likewise.
* sha256.h: correct definition on SHA224_DIGEST_SIZEJim Meyering2008-07-311-2/+2
| | | | | | | | | * lib/sha256.h (SHA224_DIGEST_SIZE): Define to 28, not 24. Reported by Paulie Pena IV <paulie4@gmail.com>. Define as 224 / 8, rather than as a literal. (SHA256_DIGEST_SIZE): Define as 256/8 rather than equivalent literal. * lib/sha512.h (SHA384_DIGEST_SIZE): Likewise, define as equiv: 384/8. (SHA512_DIGEST_SIZE): Likewise, define as equivalent quotient: 512/8.
* New modules: crypto/sha256, crypto/sha512 (from coreutils)Jim Meyering2008-05-111-0/+87
* modules/crypto/sha256: New file. * modules/crypto/sha512: Likewise. * lib/sha256.c: Likewise. * lib/sha256.h: Likewise. * lib/sha512.c: Likewise. * lib/sha512.h: Likewise. * lib/u64.h: Likewise. * m4/sha256.m4: Likewise. * m4/sha512.m4: Likewise. * MODULES.html.sh (Cryptographic computations (low-level)): List them.