Static Public Member Functions | List of all members
Hashing Struct Referencefinal

Hashing utilities. More...

#include <Hashing.hpp>

Static Public Member Functions

static std::string crc32 (const Resource::File &file)
 Calculate the CRC32 hash of the specified file. More...
 
static std::string crc32 (std::istream &stream)
 Calculate the CRC32 hash of the data supplied by the stream. More...
 
static std::string crc32 (std::string &text)
 Calculate the CRC32 hash of the supplied string. More...
 
static std::string keccak (const Resource::File &file)
 Calculate the Keccak hash of the specified file. More...
 
static std::string keccak (std::istream &stream)
 Calculate the Keccak hash of the data supplied by the stream. More...
 
static std::string keccak (std::string &text)
 Calculate the Keccak hash of the supplied string. More...
 
static std::string md5 (const Resource::File &file)
 Calculate the MD5 hash of the specified file. More...
 
static std::string md5 (std::istream &stream)
 Calculate the MD5 hash of the data supplied by the stream. More...
 
static std::string md5 (std::string &text)
 Calculate the MD5 hash of the supplied string. More...
 
static std::string sha1 (const Resource::File &file)
 Calculate the SHA-1 hash of the specified file. More...
 
static std::string sha1 (std::istream &stream)
 Calculate the SHA-1 hash of the data supplied by the stream. More...
 
static std::string sha1 (std::string &text)
 Calculate the SHA-1 hash of the supplied string. More...
 
static std::string sha256 (const Resource::File &file)
 Calculate the SHA-256 hash of the specified file. More...
 
static std::string sha256 (std::istream &stream)
 Calculate the SHA-256 hash of the data supplied by the stream. More...
 
static std::string sha256 (std::string &text)
 Calculate the SHA-256 hash of the supplied string. More...
 
static std::string sha3 (const Resource::File &file)
 Calculate the SHA-3 hash of the specified file. More...
 
static std::string sha3 (std::istream &stream)
 Calculate the SHA-3 hash of the data supplied by the stream. More...
 
static std::string sha3 (std::string &text)
 Calculate the SHA-3 hash of the supplied string. More...
 

Detailed Description

Hashing utilities.

Member Function Documentation

◆ crc32() [1/3]

static std::string crc32 ( const Resource::File file)
inlinestatic

Calculate the CRC32 hash of the specified file.

Exceptions
FileNotFoundExceptionif the file does not exist or is not a regular file
CouldNotOpenExceptionif a stream onto the file could not be opened

◆ crc32() [2/3]

static std::string crc32 ( std::istream &  stream)
inlinestatic

Calculate the CRC32 hash of the data supplied by the stream.

◆ crc32() [3/3]

static std::string crc32 ( std::string &  text)
inlinestatic

Calculate the CRC32 hash of the supplied string.

◆ keccak() [1/3]

static std::string keccak ( const Resource::File file)
inlinestatic

Calculate the Keccak hash of the specified file.

Exceptions
FileNotFoundExceptionif the file does not exist or is not a regular file
CouldNotOpenExceptionif a stream onto the file could not be opened

◆ keccak() [2/3]

static std::string keccak ( std::istream &  stream)
inlinestatic

Calculate the Keccak hash of the data supplied by the stream.

◆ keccak() [3/3]

static std::string keccak ( std::string &  text)
inlinestatic

Calculate the Keccak hash of the supplied string.

◆ md5() [1/3]

static std::string md5 ( const Resource::File file)
inlinestatic

Calculate the MD5 hash of the specified file.

Exceptions
FileNotFoundExceptionif the file does not exist or is not a regular file
CouldNotOpenExceptionif a stream onto the file could not be opened

◆ md5() [2/3]

static std::string md5 ( std::istream &  stream)
inlinestatic

Calculate the MD5 hash of the data supplied by the stream.

◆ md5() [3/3]

static std::string md5 ( std::string &  text)
inlinestatic

Calculate the MD5 hash of the supplied string.

◆ sha1() [1/3]

static std::string sha1 ( const Resource::File file)
inlinestatic

Calculate the SHA-1 hash of the specified file.

Exceptions
FileNotFoundExceptionif the file does not exist or is not a regular file
CouldNotOpenExceptionif a stream onto the file could not be opened

◆ sha1() [2/3]

static std::string sha1 ( std::istream &  stream)
inlinestatic

Calculate the SHA-1 hash of the data supplied by the stream.

◆ sha1() [3/3]

static std::string sha1 ( std::string &  text)
inlinestatic

Calculate the SHA-1 hash of the supplied string.

◆ sha256() [1/3]

static std::string sha256 ( const Resource::File file)
inlinestatic

Calculate the SHA-256 hash of the specified file.

Exceptions
FileNotFoundExceptionif the file does not exist or is not a regular file
CouldNotOpenExceptionif a stream onto the file could not be opened

◆ sha256() [2/3]

static std::string sha256 ( std::istream &  stream)
inlinestatic

Calculate the SHA-256 hash of the data supplied by the stream.

◆ sha256() [3/3]

static std::string sha256 ( std::string &  text)
inlinestatic

Calculate the SHA-256 hash of the supplied string.

◆ sha3() [1/3]

static std::string sha3 ( const Resource::File file)
inlinestatic

Calculate the SHA-3 hash of the specified file.

Exceptions
FileNotFoundExceptionif the file does not exist or is not a regular file
CouldNotOpenExceptionif a stream onto the file could not be opened

◆ sha3() [2/3]

static std::string sha3 ( std::istream &  stream)
inlinestatic

Calculate the SHA-3 hash of the data supplied by the stream.

◆ sha3() [3/3]

static std::string sha3 ( std::string &  text)
inlinestatic

Calculate the SHA-3 hash of the supplied string.


The documentation for this struct was generated from the following file: