1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 23:35:36 -08:00
Commit Graph

24 Commits

Author SHA1 Message Date
deraadt
4a39ccd02c Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis
2012-12-05 23:19:48 +00:00
jfb
e480373425 Make the `filename' parameter to HASHFile() and HASHFileChunk() const
ok pedro@, millert@
2004-06-22 01:57:29 +00:00
millert
687924d3ab Make the 2nd arg to SHA1Transform const again and unifdef SHA1HANDSOFF.
It was defined before and there is no need to for this knob...
2004-05-05 17:09:45 +00:00
millert
8e390623da Use KNF indentation style and do some u_char -> u_int8_t conversion
I missed earlier.
2004-05-03 18:05:08 +00:00
millert
9dfc8d301f Add Pad and FileChunk functions for each family of hash functions.
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-03 17:30:14 +00:00
millert
6cb58d427f Undo some recent prototype changes; it is legal to pass the helper
functions can take a NULL buf pointer.  They will malloc memory as
needed in this case.
2004-04-29 15:51:16 +00:00
millert
84306cf4ff Make the bit count u_int64_t instead of two u_int32_t. Adapted from
changes Niklas made to the md5 code long ago.  OK hshoexer@
2004-04-27 15:54:56 +00:00
millert
e5c6a985e3 Use a common source file for all the hash helper functions that
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-04-26 19:38:12 +00:00
espie
d1f942ab4c Remove unnecessary typedef usage.
u_char -> unsigned char
u_short -> unsigned short
u_long -> unsigned long
u_int -> unsigned int

okay millert@
2004-01-22 21:48:02 +00:00
avsm
d9dd16ce3e corrent __bounded__ attribute for the *Data functions, and add
__minbytes__ checks where appropriate.  tested by itojun@

fixes PR 3505 from Janjaap van Velthooven
2003-10-07 22:17:27 +00:00
avsm
89b95c1c6c add __bounded__ attributes for userland headers; enabled with -Wbounded
ok deraadt@
2003-08-01 17:38:33 +00:00
avsm
3e87668a71 backout the __bounded__ attributes for a while; requested by deraadt@ 2003-06-26 19:34:17 +00:00
avsm
585be00bb5 Mark various standard library functions with the __bounded__ attribute.
You must have an up-to-date gcc for this!
deraadt@ ok
2003-06-26 18:35:13 +00:00
millert
232cf197ef o Ansi function headers
o Add __BEGIN_DECLS/__END_DECLS to include files
o Safe macros
o Remove useless variable assignment in the End function of *hl.c
o Some minor KNF, needs more
From Dan Weeks
2002-12-23 04:33:31 +00:00
millert
c72b5b24e1 Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically. 2002-02-16 21:27:05 +00:00
angelos
5a7ec76725 Add some useful defines (used by ssyslog). 1999-02-03 03:13:18 +00:00
millert
f3e644d36a Add a missing const 1997-07-15 01:54:22 +00:00
millert
b3d2e8a024 Add SHA1End, SHA1File, SHA1Data helper functions like in md5(3). 1997-07-12 20:06:01 +00:00
millert
1430455094 Be consistent wrt unsigned vs. u_* 1997-07-10 23:37:49 +00:00
millert
e7ee6cdc55 Different sha1 functions (taken from netinet's if_sha1.c) that
are more consistent with md4/md5 functions.
1997-07-10 22:52:59 +00:00
millert
ecda5c27aa export byte swapping routine. 1996-09-30 23:27:04 +00:00
millert
e0659826be Protect prototypes with __P. 1996-09-30 03:55:47 +00:00
millert
a10e7b0555 Add function prototypes. 1996-09-29 18:30:49 +00:00
millert
d7005814ba Added sha1 (secure hash function). 1996-09-29 16:13:19 +00:00