Add API doc

This commit is contained in:
Martchus 2016-06-10 23:18:21 +02:00
parent c6f12b31f9
commit dcfadcc5d8
4 changed files with 23 additions and 2 deletions

View File

@ -27,6 +27,10 @@ set(TEST_SRC_FILES
tests/passwordfiletests.cpp
)
set(DOC_FILES
README.md
)
# meta data
set(META_PROJECT_NAME passwordfile)
set(META_PROJECT_VARNAME PASSWORD_FILE)
@ -36,10 +40,10 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
set(META_APP_DESCRIPTION "C++ library to read/write passwords from/to encrypted files.")
set(META_VERSION_MAJOR 3)
set(META_VERSION_MINOR 1)
set(META_VERSION_PATCH 1)
set(META_VERSION_PATCH 2)
# find c++utilities
find_package(c++utilities 3.3.0 REQUIRED)
find_package(c++utilities 4.0.0 REQUIRED)
use_cpp_utilities()
# find zlib
@ -57,3 +61,4 @@ include(BasicConfig)
include(WindowsResources)
include(LibraryTarget)
include(TestTarget)
include(Doxygen)

View File

@ -245,6 +245,7 @@ void PasswordFile::load()
/*!
* \brief Writes the current root entry to the file.
* \param useEncryption Specifies whether encryption should be used.
* \param useCompression Specifies whether compression should be used.
* \throws Throws ios_base::failure when an IO error occurs.
* \throws Throws runtime_error when no root entry is present.
* \throws Throws Io::CryptoException when a decryption error occurs.

View File

@ -13,6 +13,9 @@ using namespace Io;
using namespace CPPUNIT_NS;
/*!
* \brief The PasswordFileTests class tests the Io::PasswordFile class.
*/
class PasswordFileTests : public TestFixture
{
CPPUNIT_TEST_SUITE(PasswordFileTests);

View File

@ -4,10 +4,19 @@
#include <openssl/err.h>
#include <openssl/evp.h>
/*!
* \brief Contains utility classes and functions.
*/
namespace Util {
/*!
* \brief Contains functions utilizing the usage of OpenSSL.
*/
namespace OpenSsl {
/*!
* \brief Initializes OpenSSL.
*/
void init()
{
// load the human readable error strings for libcrypto
@ -18,6 +27,9 @@ void init()
OPENSSL_config(NULL);
}
/*!
* \brief Cleans resources of OpenSSL.
*/
void clean()
{
// removes all digests and ciphers