Commit Graph

97 Commits

Author SHA1 Message Date
christos
01b3cff52b add missing cast. 2017-01-10 17:46:26 +00:00
wiz
6a3cf64c78 Fix pasto. 2016-07-02 16:04:47 +00:00
christos
2b01a63d9e Add license 2016-07-02 15:50:17 +00:00
wiz
c5d2e9596f Some minor fixes.
XXX: this file has no license.
2016-07-02 08:49:19 +00:00
christos
a8673dd4cc Improve wording. 2016-07-01 22:56:06 +00:00
christos
a1d87d3311 new hmac function. 2016-07-01 22:41:39 +00:00
riastradh
212c8238ec Fix rcsid comment. 2014-12-11 21:54:13 +00:00
christos
9d26a6478d undo, the right place for this is compat_defs.h 2014-09-24 13:18:52 +00:00
he
fce45f5a15 Provide a backward-compatible conditional define of O_CLOEXEC
for those systems which lack it, since these files are used in
tools builds.
2014-09-24 07:53:06 +00:00
christos
9a513d9643 make more descriptors that we open as close-on-exec 2014-09-18 13:58:20 +00:00
rmind
8b1b6a9a1f Add Makefile in libc for murmurhash, missed in previous commit. 2012-07-08 11:43:47 +00:00
rmind
ea196989a7 Add MurmurHash2 -- a non-cryptographic hash function by Austin Appleby.
The code is taken from the upstream and is in the public domain.

OK christos@
2012-07-08 01:21:11 +00:00
abs
9e66e6d75e Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
2012-06-25 22:32:43 +00:00
matt
56a38fd9b4 Use C89 definition.
u_int*_t -> uint*_t
2012-03-20 17:06:43 +00:00
joerg
a3d484cd9e \\ -> \e 2010-04-05 21:25:01 +00:00
wiz
ccf859cb7b Close file handle in error case. Found by cppcheck. 2010-01-17 23:10:20 +00:00
joerg
f3abef9367 Improve portability and clarity by using uint8_t for the byte data
and expanding u_int to not depend on the !POSIX types.
2009-11-06 20:31:18 +00:00
snj
799a191e36 Pull in revisions 1.24 and 1.25 from upstream, which change this file's
license to ISC-style.
2009-10-22 01:38:18 +00:00
joerg
09d5d44150 Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
2009-05-26 08:04:11 +00:00
joerg
51fed7bd6c Add missing .Os. 2009-03-10 13:21:52 +00:00
apb
6aae635b8d According to Alexander Bluhm in tech-toolchain on 31 Jan 2009, the way
these files use __weak_alias causes build failures under OpenBSD,
because the OpenBSD __weak_alias macro expects the caller to supply a
semicolon, but the NetBSD __weak_alias macro supplies its own semicolon.

Attempt to fix this by avoiding the use of __weak_alias during a tools
build.
2009-03-06 18:15:23 +00:00
lukem
4359ce3c5f sign-compare fix 2009-02-12 05:03:47 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
dholland
052fb4c32d Fix replicated typo 2008-04-13 02:04:31 +00:00
agc
08c311c029 More cleanup after sha2.h and rmd160.h moved house 2006-10-28 13:05:42 +00:00
christos
a3fadcee99 this moved to common/lib/libc/hash 2006-10-27 21:24:35 +00:00
drochner
50ea67a5eb As discussed back in June, remove hmac_sha1 and hmac_md5 from libc, to
reduce bloat and namespace trouble. (both were never public; hmac_sha1
is moved to libcrypt now because it is used locally there)
2006-10-27 18:29:21 +00:00
christos
b24124a73d static before const. 2006-10-15 16:11:04 +00:00
christos
e9b01fa061 Make these weak as Matthias Drochner pointed out. 2006-06-23 17:15:18 +00:00
mrg
52874db1aa since we rename and provide a weak symbol for MD2Transform make it non-static. 2006-05-12 02:49:00 +00:00
dogcow
86811edb37 change #include <sys/endian.h> => #include <machine/endian.h> so that
it's (more) consistent in the tree; this, along with changing tools/compat's
autoconf detection from AC_CHECK_FUNCS to AC_CHECK_DECLS makes the vast
majority of htobe16 and friends' redefinition errors bite the dust.
Tested with -current and FreeBSD.
2006-02-09 22:03:15 +00:00
perry
fd18408b9a u_intN_t -> uintN_t 2005-12-26 19:40:14 +00:00
christos
e5548b402a Use reach-over sources from common/lib/libc 2005-12-20 19:31:47 +00:00
christos
03256c6e55 WARNS=4 2005-11-29 03:11:58 +00:00
tron
d58b6064be SHA2 support appeared in NetBSD 3.0. 2005-11-22 10:12:23 +00:00
christos
eb01b7b0b4 Rename "hash.c" to "hashhl.c" since this is included from *hl.c files.
The name "hash.c" is already used in db/hash/hash.c, and having duplicated
names, aside from it being bad style, breaks the tools/nbcompat build
because it picks the wrong hash.c file. Thanks to greg for helping debug
this.
2005-09-28 16:31:45 +00:00
christos
6db303aa6b The weak alias macros can only work before namespace.h gets included because
when the strings get expanded we gain an _ from namespace.h. So define a
macro to point to the appropriate include file for the hash function, and
include the hash function later, from the .c file we always include. This
allows us to eliminate the hack of including namespace.h twice as well as
nbtool_config.h.
2005-09-26 03:01:41 +00:00
christos
8a17871865 Add missing SHA384_Transform. XXX: Is that correct? 2005-09-26 02:59:29 +00:00
elad
da7e4f7332 Fix weak aliasing after recent changes.
Inspired by comments from christos@, xtraeme@, mlelstv@, mhitch@, mrg@,
and uwe@; all the bugs are mine.
2005-09-25 22:20:59 +00:00
elad
c7f8eb7c46 Need namespace.h here too. 2005-09-24 22:09:07 +00:00
elad
b387889f76 Put public domain MD2 implementation in libc/hash/md2. 2005-09-24 20:51:14 +00:00
elad
b0efb83c3e Use crypto/rmd160.h. 2005-09-24 19:33:52 +00:00
elad
40a18454f9 Fix NetBSD CVS tag, put all code under #ifdef HASH_ALGORITHM. 2005-09-24 19:30:06 +00:00
elad
7e426d2f8a Need namespace.h. 2005-09-24 19:25:23 +00:00
elad
e9795d9851 Add man-pages forgotten in previous commit. 2005-09-24 19:07:00 +00:00
elad
767c8fdd86 Organize hashing in libc. 2005-09-24 19:04:52 +00:00
elad
feab3b262a Use common code from hash.c. 2005-09-24 18:49:18 +00:00
elad
d4e0b307f7 Add skeleton file for helper routines that will be used by MD2, MD4, MD5,
SHA1, SHA2, and RMD160.
2005-09-24 18:47:37 +00:00
elad
4b106eec1a Use RMD160 implementation by Markus Friedl, the same one we use in the
kernel.
2005-09-24 18:43:17 +00:00
wiz
f6da81bb3a Prefer
.In foo
to
	.Fd #include <foo>
Mark up NULL with .Dv.
Use \*[Am], \*[Lt] for HTML output.
Add missing commas in enumerations.
2005-09-10 22:06:45 +00:00