3#include <StormByte/buffer/consumer.hxx>
4#include <StormByte/crypto/algorithm.hxx>
5#include <StormByte/crypto/exception.hxx>
6#include <StormByte/expected.hxx>
14namespace StormByte::Crypto {
21 class STORMBYTE_CRYPTO_PUBLIC
Hasher final {
27 explicit Hasher(
const Algorithm::Hash& algorithm)
noexcept;
66 Expected<std::
string,
Exception> Hash(const std::
string& input) const noexcept;
74 Expected<std::
string,
Exception> Hash(const Buffer::Simple& buffer) const noexcept;
82 Buffer::Consumer Hash(const Buffer::Consumer consumer) const noexcept;
A class representing an exception in the crypto module.
Definition exception.hxx:15
A class for managing hashing operations.
Definition hasher.hxx:21
Hasher(const Algorithm::Hash &algorithm) noexcept
Initializes a Hasher instance with the specified hashing algorithm.
~Hasher() noexcept=default
Destructor for the Hasher class.
Hasher(Hasher &&hasher) noexcept=default
Move constructor for the Hasher class.
Hasher(const Hasher &hasher)=default
Copy constructor for the Hasher class.
The namespace containing cryptographic algorithms.