summaryrefslogtreecommitdiffstats
path: root/common/sha512.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/sha512.h')
-rw-r--r--common/sha512.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/common/sha512.h b/common/sha512.h
index 5639790..39eb01e 100644
--- a/common/sha512.h
+++ b/common/sha512.h
@@ -46,35 +46,49 @@
#include <stdint.h>
+/**
+ * Hash size
+ */
#define SHA512_HASH_SIZE 64
-/* Hash size in 64-bit words */
+/**
+ *Hash size in 64-bit words
+*/
#define SHA512_HASH_WORDS 8
/**
- * SHA512 context, used during creating the SHA512 hash
+ * SHA512 context, used during calculation if SHA512 hashes
*/
struct _SHA512Context {
- uint64_t totalLength[2];
- uint64_t hash[SHA512_HASH_WORDS];
- uint32_t bufferLength;
+ uint64_t totalLength[2]; /**< */
+ uint64_t hash[SHA512_HASH_WORDS]; /**< */
+ uint32_t bufferLength; /**< */
union {
uint64_t words[16];
uint8_t bytes[128];
- } buffer;
+ } buffer; /**< */
#ifdef RUNTIME_ENDIAN
int littleEndian;
#endif /* RUNTIME_ENDIAN */
};
+/**
+ * @copydoc _SHA512Context
+ */
typedef struct _SHA512Context SHA512Context;
+
#ifdef __cplusplus
extern "C" {
#endif
void SHA512Init (SHA512Context *sc);
void SHA512Update (SHA512Context *sc, const void *data, uint32_t len);
+
+/**
+ * @copydoc SHA512Final()
+ */
+/* Strange that this functino needs @copydoc .... */
void SHA512Final (SHA512Context *sc, uint8_t hash[SHA512_HASH_SIZE]);
#ifdef __cplusplus