summaryrefslogtreecommitdiffstats
path: root/Source/cm_sha2.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove borland workarounds.Stephen Kelly2014-10-151-3/+0
| | | | | CMake 3.0 is the last release to require to be able to build with Borland.
* sha2: Avoid type-punned pointer dereference (#14314)Brad King2013-07-251-4/+8
| | | | | | | | | | | | GCC warns: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] on constructs like *(sha_word64*)&var = so use memcpy to perform such assignments instead.
* sha2: Zero entire SHA_CTX structure during cleanupBrad King2011-11-171-11/+11
| | | | | | | | | | | | Convert lines of the form MEMSET_BZERO(context, sizeof(context)); to the correct form MEMSET_BZERO(context, sizeof(*context)); as suggested by Clang.
* sha2: Suppress -Wcast-align warning from ClangBrad King2011-11-171-0/+3
| | | | | The code does contain a cast that increases alignment but only for pointers into structures known to be sufficiently aligned.
* sha2: Cast safe conversions to smaller integer typesBrad King2011-11-171-6/+6
| | | | | | | | | | | Add a cast to lines converting "uint64_t" to "unsigned int" that are known safe due to use of modulus with a small integer. This avoids compiler warnings such as conversion from 'cm_sha2_uint64_t' to 'unsigned int', possible loss of data from MSVC.
* sha2: Suppress Borland warnings in third-party codeBrad King2011-11-161-0/+3
| | | | | The sha2 implementation performs cleanup on local variables. Suppress the warning instead of fixing it to minimize modification.
* sha2: Use KWIML fixed-size integer constant macrosBrad King2011-11-161-102/+121
| | | | | Define SHA_UINT32_C and SHA_UINT64_C using the KWIML versions. Use them in place of hard-coded UL and ULL constant suffixes.
* sha2: Use "static const" instead of "const static" declarationsBrad King2011-11-161-7/+7
| | | | Fix old-style declarations in the original code.
* sha2: Use KWIML fixed-size integer types and endian-nessBrad King2011-11-161-29/+12
| | | | These are more portable than those named in the original sha2 code.
* Import sha2 implementation 1.1 from Aaron D. GiffordBrad King2011-06-271-281/+822
| | | | | | | | | Update cm_sha2.[hc] from sha2.[hc] in "sha2-1.1-ALPHA.tgz" downloaded today from http://www.aarongifford.com/computers/sha.html with trivial whitespace cleanup. This adds SHA-224 support.
* Import sha2 implementation 1.0 from Aaron D. GiffordBrad King2011-06-271-0/+1064
Copy cm_sha2.[hc] from sha2.[hc] in "sha2-1.0.tar.gz" downloaded today from http://www.aarongifford.com/computers/sha.html with trivial whitespace cleanup. Also fix #include to account for rename.