deraadt
f0e9631687
Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis
12 years ago
jfb
7a1e9128cc
Make the `filename' parameter to HASHFile() and HASHFileChunk() const
ok pedro@, millert@
20 years ago
millert
f181b464e0
Make the 2nd arg to SHA1Transform const again and unifdef SHA1HANDSOFF.
It was defined before and there is no need to for this knob...
20 years ago
millert
80dc37e3c6
Use KNF indentation style and do some u_char -> u_int8_t conversion
I missed earlier.
20 years ago
millert
e2e5c3d50c
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).
20 years ago
millert
29064d763b
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.
20 years ago
millert
dc5a1f903b
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@
20 years ago
millert
9b2dd21027
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@
20 years ago
espie
2ccf9e8a28
Remove unnecessary typedef usage.
u_char -> unsigned char
u_short -> unsigned short
u_long -> unsigned long
u_int -> unsigned int
okay millert@
21 years ago
avsm
6b3c9ddd0b
corrent __bounded__ attribute for the *Data functions, and add
__minbytes__ checks where appropriate. tested by itojun@
fixes PR 3505 from Janjaap van Velthooven
21 years ago
avsm
3f2bee58c7
add __bounded__ attributes for userland headers; enabled with -Wbounded
ok deraadt@
21 years ago
avsm
b75b1238ee
backout the __bounded__ attributes for a while; requested by deraadt@
21 years ago
avsm
3ab653a0d9
Mark various standard library functions with the __bounded__ attribute.
You must have an up-to-date gcc for this!
deraadt@ ok
21 years ago
millert
bd747228df
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
22 years ago
millert
b68c09e067
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.
23 years ago
angelos
456867e3f5
Add some useful defines (used by ssyslog).
26 years ago
millert
180624d3fc
Add a missing const
27 years ago
millert
0818e080d8
Add SHA1End, SHA1File, SHA1Data helper functions like in md5(3).
27 years ago
millert
ad6cecfcaa
Be consistent wrt unsigned vs. u_*
27 years ago
millert
0c044b6e92
Different sha1 functions (taken from netinet's if_sha1.c) that
are more consistent with md4/md5 functions.
27 years ago
millert
3d97fdc36a
export byte swapping routine.
28 years ago
millert
ed7dfea909
Protect prototypes with __P.
28 years ago
millert
3bc71f0481
Add function prototypes.
28 years ago
millert
54381534bc
Added sha1 (secure hash function).
28 years ago