LogCabin
Namespaces | Enumerations | Functions
Core/Checksum.h File Reference

Contains checksum utilities. More...

#include <cinttypes>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  LogCabin
namespace  LogCabin::Core
namespace  LogCabin::Core::Checksum

Enumerations

enum  { LogCabin::Core::Checksum::MAX_LENGTH }
 The number of bytes any checksum algorithm name and digest may occupy. More...

Functions

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.

Detailed Description

Contains checksum utilities.

Definition in file Checksum.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines