0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 09:58:43 +00:00

SHA & MD5 libs: changing headers

This commit is contained in:
Pavel Tvrdík 2015-05-13 09:27:44 +02:00
parent a41ce27bf7
commit 5aa9ab0cfd
12 changed files with 35 additions and 29 deletions

View File

@ -1,22 +1,13 @@
/*
* This code implements the MD5 message-digest algorithm.
* The algorithm is due to Ron Rivest. This code was
* written by Colin Plumb in 1993, no copyright is claimed.
* This code is in the public domain; do with it what you wish.
* BIRD -- MD5 Hash Function and HMAC-MD5 Function
*
* Equivalent code is available from RSA Data Security, Inc.
* This code has been tested against that, and is equivalent,
* except that you don't need to include two pages of legalese
* with every copy.
* (c) 2015 CZ.NIC z.s.p.o.
*
* To compute the message digest of a chunk of bytes, declare an
* MD5Context structure, pass it to MD5Init, call MD5Update as
* needed on buffers full of bytes, and then call MD5Final, which
* will fill a supplied 16-byte array with the digest.
*/
/*
* Adapted for BIRD by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*
* The code was written by Colin Plumb in 1993, no copyright is claimed.
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#include "nest/bird.h"

View File

@ -1,5 +1,12 @@
#ifndef MD5_H
#define MD5_H
/*
* BIRD -- MD5 Hash Function and HMAC-MD5 Function
*
* (c) 2015 CZ.NIC z.s.p.o.
*
* Adapted for BIRD by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
struct MD5Context {
u32 buf[4];
@ -13,4 +20,4 @@ void MD5Update(struct MD5Context *context, unsigned char const *buf,
void MD5Final(unsigned char digest[16], struct MD5Context *context);
void MD5Transform(u32 buf[4], u32 const in[16]);
#endif /* !MD5_H */
#endif /* _BIRD_MD5_H_ */

View File

@ -1,5 +1,5 @@
/*
* BIRD Library -- MD5 message-digest algorithm Tests
* BIRD -- MD5 and HMAC-MD5 Tests
*
* (c) 2015 CZ.NIC z.s.p.o.
*

View File

@ -1,5 +1,5 @@
/*
* BIRD -- SHA-1 Hash Function (FIPS 180-1, RFC 3174)
* BIRD -- SHA-1 Hash Function (FIPS 180-1, RFC 3174) and HMAC-SHA-1
*
* (c) 2015 CZ.NIC z.s.p.o.
*
@ -267,6 +267,10 @@ sha1_final(sha1_context *hd)
return hd->buf;
}
/**
* SHA1-HMAC
*/
/*
* Shortcut function which puts the hash value of the supplied buffer
* into outbuf which must have a size of 20 bytes.

View File

@ -1,5 +1,5 @@
/*
* BIRD -- SHA-1 Hash Function (FIPS 180-1, RFC 3174)
* BIRD -- SHA-1 Hash Function (FIPS 180-1, RFC 3174) and HMAC-SHA-1
*
* (c) 2015 CZ.NIC z.s.p.o.
*

View File

@ -1,5 +1,5 @@
/*
* BIRD Library -- SHA-1 Hash Function Tests
* BIRD -- SHA-1 and HMAC-SHA-1 Tests
*
* (c) 2015 CZ.NIC z.s.p.o.
*

View File

@ -1,5 +1,6 @@
/*
* BIRD -- SHA256 and SHA224 Hash Functions
* BIRD -- SHA-256 and SHA-224 Hash Functions,
* HMAC-SHA-256 and HMAC-SHA-224 Functions
*
* (c) 2015 CZ.NIC z.s.p.o.
*

View File

@ -1,5 +1,6 @@
/*
* BIRD -- SHA256 and SHA224 Hash Functions
* BIRD -- SHA-256 and SHA-224 Hash Functions,
* HMAC-SHA-256 and HMAC-SHA-224 Functions
*
* (c) 2015 CZ.NIC z.s.p.o.
*

View File

@ -1,5 +1,5 @@
/*
* BIRD Library -- SHA256 and SHA224 Hash Functions Tests
* BIRD -- SHA-256, SHA-224, HMAC-SHA-256 and HMAC-SHA224 Tests
*
* (c) 2015 CZ.NIC z.s.p.o.
*

View File

@ -1,5 +1,6 @@
/*
* BIRD -- SHA512 and SHA384 Hash Functions
* BIRD -- SHA-512 and SHA-384 Hash Functions,
* HMAC-SHA-512 and HMAC-SHA-384 Functions
*
* (c) 2015 CZ.NIC z.s.p.o.
*

View File

@ -1,5 +1,6 @@
/*
* BIRD -- SHA512 and SHA384 Hash Functions
* BIRD -- SHA-512 and SHA-384 Hash Functions,
* HMAC-SHA-512 and HMAC-SHA-384 Functions
*
* (c) 2015 CZ.NIC z.s.p.o.
*

View File

@ -1,5 +1,5 @@
/*
* BIRD Library -- SHA512 and SHA384 Hash Functions Tests
* BIRD -- SHA-512, SHA-384, HMAC-SHA-512 and HMAC-SHA-384 Tests
*
* (c) 2015 CZ.NIC z.s.p.o.
*