template<std::size_t size>
Corrade::Utility::HashDigest class

Hash digest.

Public static functions

static auto fromHexString(std::string digest) -> HashDigest<size>
Create digest from given string representation.
static auto fromByteArray(const char* digest) -> const HashDigest<size>&
Digest from given byte array.

Constructors, destructors, conversion operators

HashDigest() constexpr
Default constructor.
template<class T, class ... U>
HashDigest(T firstValue, U... nextValues) explicit constexpr
Construct digest from byte sequence.

Public functions

auto operator==(const HashDigest<size>& other) const -> bool
Equality operator.
auto operator!=(const HashDigest<size>& other) const -> bool
Non-equality operator.
auto hexString() const -> std::string
Convert the digest to lowercase hexadecimal string representation.
auto byteArray() const -> const char* constexpr
Raw digest byte array.

Function documentation

template<std::size_t size>
static HashDigest<size> Corrade::Utility::HashDigest<size>::fromHexString(std::string digest)

Create digest from given string representation.

If the digest has invalid length or contains invalid characters (other than 0-9, a-f, A-F), returns zero digest.

template<std::size_t size>
static const HashDigest<size>& Corrade::Utility::HashDigest<size>::fromByteArray(const char* digest)

Digest from given byte array.

Assumes that the array has the right length.

template<std::size_t size>
Corrade::Utility::HashDigest<size>::HashDigest() constexpr

Default constructor.

Creates zero digest.

template<std::size_t size> template<class T, class ... U>
Corrade::Utility::HashDigest<size>::HashDigest(T firstValue, U... nextValues) explicit constexpr

Construct digest from byte sequence.

Value count must be the same as size.

template<std::size_t size> template<std::size_t size>
Debug& operator<<(Debug& debug, const HashDigest<size>& value)

Debug output operator.