diff --git a/Doxyfile b/Doxyfile index 33df5c14..4b13346f 100644 --- a/Doxyfile +++ b/Doxyfile @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = /home/oneru/src/fwknop/doc +OUTPUT_DIRECTORY = ./doc # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -763,7 +763,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = DoxygenWarningLog.txt #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -775,7 +775,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = /home/oneru/src/fwknop +INPUT = ./ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/lib/base64.c b/lib/base64.c index 00363b80..3a5fa14b 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/base64.c * - * File: base64.c - * - * Purpose: Implementation of the Base64 encode/decode algorithim. - * - * This code was derived from the base64.c part of FFmpeg written + * \brief Implementation of the Base64 encode/decode algorithim. + */ + +/* This code was derived from the base64.c part of FFmpeg written * by Ryan Martell. (rdm4@martellventures.com). * * Copyright (C) Ryan Martell. (rdm4@martellventures.com) diff --git a/lib/base64.h b/lib/base64.h index e1dd5c47..d0822405 100644 --- a/lib/base64.h +++ b/lib/base64.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/base64.h * - * File: base64.h - * - * Purpose: Header for the fwknop base64.c - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Header for the fwknop base64.c + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/cipher_funcs.c b/lib/cipher_funcs.c index 5c62b665..4bc76f69 100644 --- a/lib/cipher_funcs.c +++ b/lib/cipher_funcs.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/cipher_funcs.c * - * File: cipher_funcs.c - * - * Purpose: Cipher functions used by fwknop - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Cipher functions used by fwknop + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/cipher_funcs.h b/lib/cipher_funcs.h index 338c14b1..c82bf852 100644 --- a/lib/cipher_funcs.h +++ b/lib/cipher_funcs.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/cipher_funcs.h * - * File: cipher_funcs.h - * - * Purpose: Header for the fwknop cipher_funcs.c. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Header for the fwknop cipher_funcs.c. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/digest.c b/lib/digest.c index e3f7b063..158beb42 100644 --- a/lib/digest.c +++ b/lib/digest.c @@ -1,9 +1,10 @@ /** - * @file digest.c + * \file lib/digest.c * - * @brief Roll-up of the digests used by fwknop. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Roll-up of the digests used by fwknop. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/digest.h b/lib/digest.h index b9f3842f..14f02f41 100644 --- a/lib/digest.h +++ b/lib/digest.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/digest.h * - * File: digest.h - * - * Purpose: Header for the fwknop digest.c. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Header for the fwknop digest.c. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko.h b/lib/fko.h index 98cf4ab2..f549fd2b 100644 --- a/lib/fko.h +++ b/lib/fko.h @@ -1,5 +1,5 @@ /** - * \file fko.h + * \file lib/fko.h * * \brief Header for libfko */ diff --git a/lib/fko_client_timeout.c b/lib/fko_client_timeout.c index 9f0bef11..fd81b3d9 100644 --- a/lib/fko_client_timeout.c +++ b/lib/fko_client_timeout.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_client_timeout.c * - * File: fko_spa_client_timeout.c - * - * Purpose: Set/Get the spa client timeout data - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Set/Get the spa client timeout data + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_common.h b/lib/fko_common.h index b62690db..efa710da 100644 --- a/lib/fko_common.h +++ b/lib/fko_common.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_common.h * - * File: fko_common.h - * - * Purpose: Common header for libfko source files. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Common header for libfko source files. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_context.h b/lib/fko_context.h index 786d7208..ef249e6d 100644 --- a/lib/fko_context.h +++ b/lib/fko_context.h @@ -1,6 +1,5 @@ /** - * - * \file fko_context.h + * \file lib/fko_context.h * * \brief fko context definiton. */ diff --git a/lib/fko_decode.c b/lib/fko_decode.c index eb2189f8..1dc6dd57 100644 --- a/lib/fko_decode.c +++ b/lib/fko_decode.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_decode.c * - * File: fko_decode.c - * - * Purpose: Decode an FKO SPA message after decryption. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Decode an FKO SPA message after decryption. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_digest.c b/lib/fko_digest.c index 0779314b..05d9ded2 100644 --- a/lib/fko_digest.c +++ b/lib/fko_digest.c @@ -1,13 +1,12 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_digest.c * - * File: fko_digest.c - * - * Purpose: Create the base64-encoded digest for the current spa data. The + * \brief Create the base64-encoded digest for the current spa data. The * digest used is determined by the digest_type setting in the * fko context. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_encode.c b/lib/fko_encode.c index 55dfbd83..9bdbde40 100644 --- a/lib/fko_encode.c +++ b/lib/fko_encode.c @@ -1,13 +1,12 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_encode.c * - * File: fko_encode.c - * - * Purpose: Encodes some pieces of the spa data then puts together all of + * \brief Encodes some pieces of the spa data then puts together all of * the necessary pieces to gether to create the single encoded * message string. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_encryption.c b/lib/fko_encryption.c index 8d6158b7..77d27125 100644 --- a/lib/fko_encryption.c +++ b/lib/fko_encryption.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_encryption.c * - * File: fko_encryption.c - * - * Purpose: Set/Get the spa encryption type. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Set/Get the spa encryption type. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_error.c b/lib/fko_error.c index 0a22a49a..fd41db74 100644 --- a/lib/fko_error.c +++ b/lib/fko_error.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_error.c * - * File: fko_error.c - * - * Purpose: Error handling functions for libfko - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Error handling functions for libfko + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_funcs.c b/lib/fko_funcs.c index 05483548..ffb77e08 100644 --- a/lib/fko_funcs.c +++ b/lib/fko_funcs.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_funcs.c * - * File: fko_funcs.c - * - * Purpose: General utility functions for libfko - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief General utility functions for libfko + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_hmac.c b/lib/fko_hmac.c index 2cd37351..7b5b7984 100644 --- a/lib/fko_hmac.c +++ b/lib/fko_hmac.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_hmac.c * - * File: fko_hmac.c - * - * Purpose: Provide HMAC support to SPA communications - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Provide HMAC support to SPA communications + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_limits.h b/lib/fko_limits.h index c41f404b..5f02cc18 100644 --- a/lib/fko_limits.h +++ b/lib/fko_limits.h @@ -1,9 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_limits.h * - * File: fko_limits.h - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief #defines for libfko limits + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_message.c b/lib/fko_message.c index 1ce55680..b89e755c 100644 --- a/lib/fko_message.c +++ b/lib/fko_message.c @@ -1,12 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_message.c * - * File: fko_message.c - * - * Purpose: Set/Get the spa message (access req/command/etc) based - * on the current spa data. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Set/Get the spa message (access req/command/etc) based on the current spa data. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_message.h b/lib/fko_message.h index 885ee7fc..f8b26fcf 100644 --- a/lib/fko_message.h +++ b/lib/fko_message.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_message.h * - * File: fko_message.h - * - * Purpose: Provide validation functions for SPA messages - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Provide validation functions for SPA messages + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_nat_access.c b/lib/fko_nat_access.c index cd53dc5d..4fb11832 100644 --- a/lib/fko_nat_access.c +++ b/lib/fko_nat_access.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_nat_access.c * - * File: fko_nat_access.c - * - * Purpose: Set/Get the spa nat access request data. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Set/Get the spa nat access request data. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_rand_value.c b/lib/fko_rand_value.c index 4f907e90..fdbfa422 100644 --- a/lib/fko_rand_value.c +++ b/lib/fko_rand_value.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_rand_value.c * - * File: fko_rand_value.c - * - * Purpose: Generate a 16-byte random numeric value. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \ Generate a 16-byte random numeric value. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_server_auth.c b/lib/fko_server_auth.c index 1a565e9c..2d4cab3b 100644 --- a/lib/fko_server_auth.c +++ b/lib/fko_server_auth.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_server_auth.c * - * File: fko_server_auth.c - * - * Purpose: Set/Get the spa server auth data. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Set/Get the spa server auth data. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_state.h b/lib/fko_state.h index fcb40054..bc740c33 100644 --- a/lib/fko_state.h +++ b/lib/fko_state.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_state.h * - * File: fko_state.h - * - * Purpose: Defines various states and flags for libfko operations. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Defines various states and flags for libfko operations. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_timestamp.c b/lib/fko_timestamp.c index d608f3c1..ee099c45 100644 --- a/lib/fko_timestamp.c +++ b/lib/fko_timestamp.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_timestamp.c * - * File: fko_timestamp.c - * - * Purpose: Get the current timestamp with optional offset applied. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Get the current timestamp with optional offset applied. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_user.c b/lib/fko_user.c index f3826ab9..446b8f20 100644 --- a/lib/fko_user.c +++ b/lib/fko_user.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_user.c * - * File: fko_user.c - * - * Purpose: Set/Get the current username. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Set/Get the current username. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_user.h b/lib/fko_user.h index 646c953c..5e5e33cd 100644 --- a/lib/fko_user.h +++ b/lib/fko_user.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/fko_user.h * - * File: fko_user.h - * - * Purpose: Provide validation functions for SPA messages - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Provide validation functions for SPA messages + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/fko_utests.c b/lib/fko_utests.c index d5b85882..a9f22b3c 100755 --- a/lib/fko_utests.c +++ b/lib/fko_utests.c @@ -1,3 +1,9 @@ +/** + * \file lib/fko_utests.c + * + * \brief Main CUnit test function for libfko + */ + #include "CUnit/Basic.h" #include "fko.h" diff --git a/lib/gpgme_funcs.c b/lib/gpgme_funcs.c index 3fdc09f6..0591e30a 100644 --- a/lib/gpgme_funcs.c +++ b/lib/gpgme_funcs.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/gpgme_funcs.c * - * File: gpgme_funcs.c - * - * Purpose: gpgme-related functions for GPG encryptions support in libfko. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief gpgme-related functions for GPG encryptions support in libfko. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/gpgme_funcs.h b/lib/gpgme_funcs.h index 4433c0a6..8ab583d1 100644 --- a/lib/gpgme_funcs.h +++ b/lib/gpgme_funcs.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/gpgme_funcs.h * - * File: gpgme_funcs.h - * - * Purpose: Header for the fwknop gpgme_funcs.c. - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Header for the fwknop gpgme_funcs.c. + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/hmac.c b/lib/hmac.c index 52a36b0e..73e2afa0 100644 --- a/lib/hmac.c +++ b/lib/hmac.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/hmac.c * - * File: fko_hmac.c - * - * Purpose: Provide HMAC support to SPA communications - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Provide HMAC support to SPA communications + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/hmac.h b/lib/hmac.h index 8eb05645..a5fb4785 100644 --- a/lib/hmac.h +++ b/lib/hmac.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/hmac.h * - * File: hmac.h - * - * Purpose: Provide HMAC support for SPA communications - * - * Fwknop is developed primarily by the people listed in the file 'AUTHORS'. + * \brief Provide HMAC support for SPA communications + */ + +/* Fwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2009-2015 fwknop developers and contributors. For a full * list of contributors, see the file 'CREDITS'. * diff --git a/lib/md5.c b/lib/md5.c index 33080aaa..0d410396 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/md5.c * - * File: md5.c - * - * Purpose: Implementation of the MD5 message-digest algorithm for libfwknop. - * - * This code implements the MD5 message-digest algorithm. + * \brief Implementation of the MD5 message-digest algorithm for libfwknop. + */ + +/* 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. diff --git a/lib/md5.h b/lib/md5.h index cecd0621..526fb0c6 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/md5.h * - * File: md5.h - * - * Purpose: Header for the fwknop md5.c. - * - * MD5 Message Digest Algorithm (RFC1321). + * \brief Header for the fwknop md5.c. + */ + +/* MD5 Message Digest Algorithm (RFC1321). * * Derived from cryptoapi implementation, originally based on the * public domain implementation written by Colin Plumb in 1993. diff --git a/lib/rijndael.c b/lib/rijndael.c index 451d6a5b..8b4df171 100644 --- a/lib/rijndael.c +++ b/lib/rijndael.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/rijndael.c * - * File: rijndael.c - * - * Purpose: rijndael - An implementation of the Rijndael cipher. - * - * Copyright (C) 2000, 2001 Rafael R. Sevilla + * \brief rijndael - An implementation of the Rijndael cipher. + */ + +/* Copyright (C) 2000, 2001 Rafael R. Sevilla * * Currently maintained by brian d foy, * diff --git a/lib/rijndael.h b/lib/rijndael.h index 7437a7cf..81f88343 100644 --- a/lib/rijndael.h +++ b/lib/rijndael.h @@ -1,10 +1,10 @@ +/** + * \file lib/rijndael.h + * + * \brief rijndael - An implementation of the Rijndael cipher. + */ + /* - ***************************************************************************** - * - * File: rigndael.c - * - * Purpose: rijndael - An implementation of the Rijndael cipher. - * * Copyright (C) 2000, 2001 Rafael R. Sevilla * * Currently maintained by brian d foy, @@ -67,7 +67,10 @@ typedef struct { uint8_t salt[SALT_LEN]; } RIJNDAEL_context; -/* This basically performs Rijndael's key scheduling algorithm, as it's the +/** + * \brief initialize a Rijndael context with key + * + * This basically performs Rijndael's key scheduling algorithm, as it's the * only initialization required anyhow. The key size is specified in bytes, * but the only valid values are 16 (128 bits), 24 (192 bits), and 32 (256 * bits). If a value other than these three is specified, the key will be diff --git a/lib/sha1.c b/lib/sha1.c index 3da18e61..49549462 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -1,12 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/sha1.c * - * File: sha1.c - * - * Purpose: Implementation of the SHA1 message-digest algorithm for - * libfwknop. - * - * NIST Secure Hash Algorithm + * \brief Implementation of the SHA1 message-digest algorithm for libfwknop. + */ + +/* NIST Secure Hash Algorithm * Heavily modified by Uwe Hollerbach * from Peter C. Gutmann's implementation as found in * Applied Cryptography by Bruce Schneier @@ -78,7 +76,7 @@ sha1_transform(SHA1_INFO *sha1_info) for (i = 0; i < 16; ++i) { T = *((uint32_t *) dp); dp += 4; - W[i] = + W[i] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) | ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff); diff --git a/lib/sha1.h b/lib/sha1.h index d627aa33..612f75a4 100644 --- a/lib/sha1.h +++ b/lib/sha1.h @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/sha1.h * - * File: sha1.h - * - * Purpose: Header for sha1.c - * - * sha - An implementation of the NIST SHA1 Message Digest + * \brief Header for sha1.c + */ + +/* sha - An implementation of the NIST SHA1 Message Digest * algorithm. * * Copyright (C) 2001 Rafael R. Sevilla diff --git a/lib/sha2.c b/lib/sha2.c index 1f74bff6..fde707c7 100644 --- a/lib/sha2.c +++ b/lib/sha2.c @@ -1,11 +1,10 @@ -/* - ***************************************************************************** +/** + * \file lib/sha2.c * - * File: sha2.c - * - * Purpose: An implementation of the SHA 26/384/512 digests. - * - * AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/ + * \brief An implementation of the SHA 26/384/512 digests. + */ + +/* AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/ * * Copyright (c) 2000-2001, Aaron D. Gifford * @@ -22,7 +21,7 @@ * 3. Neither the name of the copyright holder nor the names of contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -83,7 +82,7 @@ * * And for little-endian machines, add: * - * #define BYTE_ORDER LITTLE_ENDIAN + * #define BYTE_ORDER LITTLE_ENDIAN * * Or for big-endian machines: * @@ -496,11 +495,11 @@ void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { /* Part of the message block expansion: */ s0 = W256[(j+1)&0x0f]; s0 = sigma0_256(s0); - s1 = W256[(j+14)&0x0f]; + s1 = W256[(j+14)&0x0f]; s1 = sigma1_256(s1); /* Apply the SHA-256 compression function to update a..h */ - T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); T2 = Sigma0_256(a) + Maj(a, b, c); h = g; diff --git a/lib/sha2.h b/lib/sha2.h index 80058fa7..84f4e1ec 100644 --- a/lib/sha2.h +++ b/lib/sha2.h @@ -1,12 +1,11 @@ -/* - ***************************************************************************** +/** + * \file lib/sha2.h * - * File: sha2.h + * \brief Header for sha2.c - Implementation of the SHA 26/384/512 digests. + */ + +/* AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/ * - * Purpose: Header for sha2.c - Implementation of the SHA 26/384/512 digests. - * - * AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/ - * * Copyright (c) 2000-2001, Aaron D. Gifford * All rights reserved. * @@ -21,7 +20,7 @@ * 3. Neither the name of the copyright holder nor the names of contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -101,7 +100,7 @@ typedef unsigned long long u_int64_t; /* 8-bytes (64-bits) */ * * #include * - * If you choose to use then please define: + * If you choose to use then please define: * * #define SHA2_USE_INTTYPES_H * @@ -193,4 +192,3 @@ void SHA512_Final(); #endif /* __cplusplus */ #endif /* __SHA2_H__ */ - diff --git a/lib/sha3.c b/lib/sha3.c index 75559ecb..810140c7 100644 --- a/lib/sha3.c +++ b/lib/sha3.c @@ -1,3 +1,9 @@ +/** + * \file lib/sha3.c + * + * \brief Implementation of SHA3 + */ + /* Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni, Joan Daemen, Michaƫl Peeters, Gilles Van Assche and Ronny Van Keer, hereby diff --git a/lib/sha3.h b/lib/sha3.h index 88afcc51..4b22ab48 100644 --- a/lib/sha3.h +++ b/lib/sha3.h @@ -1,3 +1,11 @@ +/** + * \file lib/sha3.h + * + * \brief header file for SHA3 routines + */ + + + #define SHA3_256_DIGEST_LEN 32 #define SHA3_512_DIGEST_LEN 64 #define SHA3_256_BLOCK_LEN 136 @@ -10,31 +18,35 @@ void Keccak(unsigned int rate, unsigned int capacity, const unsigned char *input, unsigned long long int inputByteLen, unsigned char delimitedSuffix, unsigned char *output, unsigned long long int outputByteLen); /** - * Function to compute SHAKE128 on the input message with any output length. + * \brief Function to compute SHAKE128 on the input message with any output length. + * + * Not currently in use */ void FIPS202_SHAKE128(const unsigned char *input, unsigned int inputByteLen, unsigned char *output, int outputByteLen); /** - * Function to compute SHAKE256 on the input message with any output length. + * \brief Function to compute SHAKE256 on the input message with any output length. + * + * Not currently in use */ void FIPS202_SHAKE256(const unsigned char *input, unsigned int inputByteLen, unsigned char *output, int outputByteLen); /** - * Function to compute SHA3-224 on the input message. The output length is fixed to 28 bytes. + * \brief Function to compute SHA3-224 on the input message. The output length is fixed to 28 bytes. */ void FIPS202_SHA3_224(const unsigned char *input, unsigned int inputByteLen, unsigned char *output); /** - * Function to compute SHA3-256 on the input message. The output length is fixed to 32 bytes. + * \brief Function to compute SHA3-256 on the input message. The output length is fixed to 32 bytes. */ void FIPS202_SHA3_256(const unsigned char *input, unsigned int inputByteLen, unsigned char *output); /** - * Function to compute SHA3-384 on the input message. The output length is fixed to 48 bytes. + * \brief Function to compute SHA3-384 on the input message. The output length is fixed to 48 bytes. */ void FIPS202_SHA3_384(const unsigned char *input, unsigned int inputByteLen, unsigned char *output); /** - * Function to compute SHA3-512 on the input message. The output length is fixed to 64 bytes. + * \brief Function to compute SHA3-512 on the input message. The output length is fixed to 64 bytes. */ void FIPS202_SHA3_512(const unsigned char *input, unsigned int inputByteLen, unsigned char *output);