/* Declarations of functions and data types used for SHA512 and SHA384 sum
library functions.
- Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# include "u64.h"
+# ifdef __cplusplus
+extern "C" {
+# endif
+
/* Structure to save state of computation between the single steps. */
struct sha512_ctx
{
u64 buffer[32];
};
-enum { SHA384_DIGEST_SIZE = 48 };
-enum { SHA512_DIGEST_SIZE = 64 };
+enum { SHA384_DIGEST_SIZE = 384 / 8 };
+enum { SHA512_DIGEST_SIZE = 512 / 8 };
/* Initialize structure containing state of computation. */
extern void sha512_init_ctx (struct sha512_ctx *ctx);
extern void *sha512_buffer (const char *buffer, size_t len, void *resblock);
extern void *sha384_buffer (const char *buffer, size_t len, void *resblock);
+# ifdef __cplusplus
+}
+# endif
+
#endif