Mercurial > hg > th-libs
diff th_crypto.h @ 436:9148bc3fa838
Begin adding Doxygen documentation for some things. Very rudimentary, and
most things are not documented yet.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 10 May 2017 21:00:37 +0300 |
parents | 5f9de1d542ee |
children | 36c50873e02c |
line wrap: on
line diff
--- a/th_crypto.h Fri Apr 07 02:49:08 2017 +0300 +++ b/th_crypto.h Wed May 10 21:00:37 2017 +0300 @@ -7,6 +7,8 @@ * written by Colin Plumb in 1993, no copyright is claimed. * This code is in the public domain; do with it what you wish. */ +/// @file +/// @brief Cryptography and hash related functions #ifndef TH_CRYPTO_H #define TH_CRYPTO_H 1 @@ -22,17 +24,22 @@ #endif +/** @def MD5 digest related defines + */ #define TH_MD5HASH_LENGTH (16) #define TH_MD5HASH_LENGTH_CH (TH_MD5HASH_LENGTH * 2) + +/** MD5 digest state structure + */ typedef struct { - uint32_t bits[2]; // Message length in bits, lsw first - uint32_t buf[4]; // Digest buffer - uint8_t in[64]; // Accumulate block + uint32_t bits[2]; ///< Message length in bits, lsw first + uint32_t buf[4]; ///< Digest buffer + uint8_t in[64]; ///< Accumulate block } th_md5state_t; -typedef uint8_t th_md5hash_t[TH_MD5HASH_LENGTH]; +typedef uint8_t th_md5hash_t[TH_MD5HASH_LENGTH]; ///< A structure containing MD5 digest hash void th_md5_init(th_md5state_t *ctx);