* Can be freely distributed and used under the terms of the GNU GPL.
*/
-#ifndef _BIRD_SHA1_H
-#define _BIRD_SHA1_H
+#ifndef _BIRD_SHA1_H_
+#define _BIRD_SHA1_H_
#include "sysdep/config.h"
void sha1_hmac_update(sha1_hmac_context *hd, const byte *data, uint datalen); /** Hash another @datalen bytes of data. See sha1_update(). */
byte *sha1_hmac_final(sha1_hmac_context *hd); /** Terminate the HMAC and return a pointer to the allocated hash. See sha1_final(). */
-#define SHA1_SIZE 20 /** Size of the SHA1 hash in its binary representation **/
-#define SHA1_HEX_SIZE 41 /** Buffer length for a string containing SHA1 in hexadecimal format. **/
-#define SHA1_BLOCK_SIZE 64 /** SHA1 splits input to blocks of this size. **/
+#define SHA1_SIZE 20 /** Size of the SHA1 hash in its binary representation **/
+#define SHA1_HEX_SIZE 41 /** Buffer length for a string containing SHA1 in hexadecimal format. **/
+#define SHA1_BLOCK_SIZE 64 /** SHA1 splits input to blocks of this size. **/
-#endif
+#endif /* _BIRD_SHA1_H_ */
* Can be freely distributed and used under the terms of the GNU GPL.
*/
-#ifndef _BIRD_SHA256_H
-#define _BIRD_SHA256_H
+#ifndef _BIRD_SHA256_H_
+#define _BIRD_SHA256_H_
#define SHA256_SIZE 32
#define SHA256_HEX_SIZE 65
typedef sha256_context sha224_context;
void sha256_init(sha256_context *ctx);
-void sha256_init(sha224_context *ctx);
+void sha224_init(sha224_context *ctx);
void sha256_update(sha256_context *ctx, const byte *in_buf, size_t in_len);
void sha224_update(sha224_context *ctx, const byte *in_buf, size_t in_len)
return sha256_final(ctx);
}
-#endif
+#endif /* _BIRD_SHA256_H_ */
* Can be freely distributed and used under the terms of the GNU GPL.
*/
-#ifndef SHA256_HMAC_H
-#define SHA256_HMAC_H
+#ifndef _BIRD_SHA256_HMAC_H_
+#define _BIRD_SHA256_HMAC_H_
#define SHA256_SIZE 32
#define SHA256_HEX_SIZE 65
void sha256_hmac_update(sha256_hmac_context *ctx, const void *buf, size_t buflen);
const byte *sha256_hmac_final(sha256_hmac_context *ctx);
-#endif /* SHA256_HMAC_H */
+#endif /* _BIRD_SHA256_HMAC_H_ */