summaryrefslogtreecommitdiff
path: root/lib/libc/hash
AgeCommit message (Collapse)Author
2009-04-15allow building without SHA384 and SHA512 (i.e. SHA256 only) withDamien Miller
-DSHA256_ONLY in order to save space; ok deraadt@
2008-09-12the last example doesn't need a ctx variable;Damien Miller
from Loic Tortay via jmc@
2008-09-06Rename SHA256/384/512 API to avoid namespace collisions withDamien Miller
forthcoming OpenSSL update. Function names lose their underscore (SHA256_Init => SHA256Init) and the various SHA256_CTX, SHA512_CTX are merged into a single SHA2_CTX that is used for all these hashes. ok millert@ manpage bits jmc@ "please commit" deraadt@
2008-07-29Split SHA1Transform() back into smaller pieces when compiling on landisk,Miod Vallat
to defeat gcc optimization bugs. Similar to what had been done on sparc64 in the past. ok millert@ deraadt@
2008-02-13The digest in the example seems to have been generatedArtur Grabowski
by code that does not do zero padding. The example code does. Fix. millert@ ok
2007-05-31convert to new .Dd format;Jason McIntyre
2007-02-27sha2 hashes are not 5 32-bit ints in size. Just leave out the sizeTodd C. Miller
in ints since there are multiple flavors. The key point to get across is that when storing as a type > byte it may be necessary to do byte swapping depending on the machine's byte order. Noticed by Tamas TEVESZ.
2006-10-03when using SHA1Data(), no CTX is needed, so zap that line in the exampleAlexander von Gernler
ok jmc@
2005-09-12some markup and punctuation fixes from wiz@netbsdJason McIntyre
2005-08-08zap remaining rcsid.Marc Espie
Kill old files that are no longer compiled. okay theo
2004-09-16Fix MD5FileChunk() when passed a 0 length; makes MD5File() work again.Todd C. Miller
From Peter Galbavy.
2004-08-24Whoops, ripemd was broken, not ripemd-160.Todd C. Miller
2004-08-24Collisions have been found for the full versions of MD4, MD5 and RMD160.Todd C. Miller
2004-06-22Make the `filename' parameter to HASHFile() and HASHFileChunk() constJean-Francois Brousseau
ok pedro@, millert@
2004-05-28In the Final function, move the context zeroing into the digest != NULLTodd C. Miller
scope so that passing a NULL digest is equivalent to the Pad function (like it used to be). Fixes skey w/ sha1 as noticed by David Krause.
2004-05-16Add .Xr's to the commands implementing the various digests. ok millert@Otto Moerbeek
2004-05-07Simpler byte order flipping. Now the only place we explicitly checkTodd C. Miller
for the host byte order is when we copy the final digest (and that is just an optimization).
2004-05-05Make the Transform functions match the other hash types and document them.Todd C. Miller
Use sizeof() in the Init functions where it makes sense. Use weak aliases instead of wrapper functions. Probably should have gone in before the major bump but as these are only used internally by the sha2 functions themselves there should be no problem.
2004-05-05Make the 2nd arg to SHA1Transform const again and unifdef SHA1HANDSOFF.Todd C. Miller
It was defined before and there is no need to for this knob...
2004-05-03Sync some prototypes with the headersTodd C. Miller
2004-05-03Some u_char -> u_int8_t conversion I missed earlier.Todd C. Miller
2004-05-03Use KNF indentation style and do some u_char -> u_int8_t conversionTodd C. Miller
I missed earlier.
2004-05-03Add Pad and FileChunk functions for each family of hash functions.Todd C. Miller
The Pad function does padding like in Final but does not finish processing. The FileChunk function creates a digest from a portion of a file. Also made the length parameters consistent (and size_t).
2004-05-03Rev 1.4 was bogus (committed from the wrong tree), this repairs it.Todd C. Miller
2004-05-02some minor KNFTodd C. Miller
2004-04-29Sync with md5.c rev. 1.4Todd C. Miller
2004-04-29Changes inspired by Markus's rmd160 implementation:Todd C. Miller
o Make MD5Update() more readable o Simplify padding in MD5Final() o Do copy + byte flip in MD5Transform() instead of in the caller The result is a faster md5 and the byte order foo is kept to a minimum.
2004-04-29Undo some recent prototype changes; it is legal to pass the helperTodd C. Miller
functions can take a NULL buf pointer. They will malloc memory as needed in this case.
2004-04-29The data pointer passed to the transform function may not be properlyTodd C. Miller
aligned so copy it in a way that a) is endian indepenent and b) does not rely on alignment. Problem found and solution tested by hshoexer@
2004-04-29typo in SEE ALSO;Jason McIntyre
2004-04-29more KNFTodd C. Miller
2004-04-29Some KNFTodd C. Miller
2004-04-28KNF: function names should be at column 0 for easier grepping.Todd C. Miller
2004-04-28Pass sizeof(*pointer) not sizeof(point) to memset. Karsten Desler.Todd C. Miller
2004-04-28Don't build lib/libc/md, build md[45] in lib/libc/hash instead.Todd C. Miller
2004-04-28md[45] man pageTodd C. Miller
2004-04-28Xr sha2(3)Todd C. Miller
2004-04-28PD md4 code derived from Colin Plumb's md5 routines.Todd C. Miller
2004-04-28Rename members of struct MD5Context to match other hash routines.Todd C. Miller
Add constants for buffer lengths and use them. Make bit count 64bit based on changes by niklas@ long ago. Conver htole32n() to macros and unroll loops.
2004-04-28PD version of md5(3) based on code written by Colin Plumb.Todd C. Miller
2004-04-27Make the bit count u_int64_t instead of two u_int32_t. Adapted fromTodd C. Miller
changes Niklas made to the md5 code long ago. OK hshoexer@
2004-04-26Use a common source file for all the hash helper functions thatTodd C. Miller
previously lived in foohl.c. The foohl.c files are now generated via sed, though perhaps cpp could be used in the future. Use u_int8_t instead of unsigned char for the buffers struct fooContext. Add constants for buffer lengths and use them in function prototypes and the man pages. This is basically cosmetic surgery; there should be no functional changes. OK deraadt@
2004-03-31remove sparc64/gcc2 workaround.Brad Smith
ok millert@ deraadt@ jason@
2003-12-14alignment fixes (e.g sparc 64); from Daniel Lucq; ok millert, henningMarkus Friedl
2003-10-03correct hash for EXAMPLES, plus some typos;Jason McIntyre
from er, Charlie Root (PR 3506)
2003-09-08Zap context correctly, from Juergen Buchmueller <pullmoll at stop1984 dot com>Todd C. Miller
Same as sys/crypto/sha2.c revision 1.2
2003-07-21Remove bogus static; from Hiroki SatoTodd C. Miller
2003-06-25missing const; millert okTheo de Raadt
2003-06-17Sync with share/misc/license.template and add missing DARPA creditTodd C. Miller
where applicable.
2003-06-03Use an ISC-tyle license for all my code; it is simpler and more permissive.Todd C. Miller