LogCabin
Classes | Namespaces | Defines | Typedefs | Functions | Variables
Core/Checksum.cc File Reference
#include <map>
#include <memory>
#include <mutex>
#include <cstring>
#include <cryptopp/cryptlib.h>
#include <cryptopp/crc.h>
#include <cryptopp/adler32.h>
#include <cryptopp/md5.h>
#include <cryptopp/sha.h>
#include <cryptopp/whrlpool.h>
#include <cryptopp/tiger.h>
#include <cryptopp/ripemd.h>
#include "Core/Debug.h"
#include "Core/Checksum.h"
#include "Core/STLUtil.h"
#include "Core/StringUtil.h"
#include "Core/Util.h"

Go to the source code of this file.

Classes

class  LogCabin::Core::Checksum::anonymous_namespace{Checksum.cc}::Algorithms
 A container for a set of Algorithm implementations. More...

Namespaces

namespace  LogCabin
namespace  LogCabin::Core
namespace  LogCabin::Core::Checksum
namespace  LogCabin::Core::Checksum::anonymous_namespace{Checksum.cc}

Defines

#define CRYPTOPP_ENABLE_NAMESPACE_WEAK

Typedefs

typedef uint32_t(* LogCabin::Core::Checksum::anonymous_namespace{Checksum.cc}::Algorithm )(std::initializer_list< std::pair< const void *, uint64_t >> data, char result[MAX_LENGTH])
 Type for function that calculate the checksum for some data.

Functions

uint32_t LogCabin::Core::Checksum::anonymous_namespace{Checksum.cc}::writeChecksumHelper (CryptoPP::HashTransformation &hashFn, const char *name, std::initializer_list< std::pair< const void *, uint64_t >> data, char result[MAX_LENGTH])
 Helper for writeChecksum template, to keep code bloat to a minimum.
template<typename HashFn >
uint32_t LogCabin::Core::Checksum::anonymous_namespace{Checksum.cc}::writeChecksum (std::initializer_list< std::pair< const void *, uint64_t >> data, char result[MAX_LENGTH])
 Template to produce functions of type Algorithm when instantiated with a CryptoPP::HashTransformation.
std::vector< std::string > LogCabin::Core::Checksum::listAlgorithms ()
 Returns the names of all available hash functions.
uint32_t LogCabin::Core::Checksum::calculate (const char *algorithm, const void *data, uint64_t dataLength, char output[MAX_LENGTH])
 Calculate the checksum for a chunk of data.
uint32_t LogCabin::Core::Checksum::calculate (const char *algorithm, std::initializer_list< std::pair< const void *, uint64_t >> data, char output[MAX_LENGTH])
 Calculate the checksum for a chunk of data.
uint32_t LogCabin::Core::Checksum::length (const char *checksum, uint32_t maxChecksumLength)
 Check to see if the checksum format looks plausible.
std::string LogCabin::Core::Checksum::verify (const char *checksum, const void *data, uint64_t dataLength)
 Verify data against an existing checksum.
std::string LogCabin::Core::Checksum::verify (const char *checksum, std::initializer_list< std::pair< const void *, uint64_t >> data)
 Verify data against an existing checksum.

Variables

class
LogCabin::Core::Checksum::anonymous_namespace{Checksum.cc}::Algorithms 
LogCabin::Core::Checksum::anonymous_namespace{Checksum.cc}::algorithms

Define Documentation

Definition at line 22 of file Checksum.cc.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines