StormByte C++ Library: Crypto module 0.0.9999
StormByte-Crypto is a StormByte library module for handling cryptographic operations
Loading...
Searching...
No Matches
sha3_256.hxx
1#pragma once
2
3#include <StormByte/crypto/hasher/generic.hxx>
4
9namespace StormByte::Crypto::Hasher {
14 class STORMBYTE_CRYPTO_PUBLIC SHA3_256 final: public Generic {
15 public:
20 inline SHA3_256():
21 Generic(Type::SHA3_256) {}
22
27 SHA3_256(const SHA3_256& other) = default;
28
33 SHA3_256(SHA3_256&& other) noexcept = default;
34
38 virtual ~SHA3_256() noexcept = default;
39
45 SHA3_256& operator=(const SHA3_256& other) = default;
46
52 SHA3_256& operator=(SHA3_256&& other) noexcept = default;
53
58 inline PointerType Clone() const noexcept override {
59 return std::make_shared<SHA3_256>(*this);
60 }
61
66 inline PointerType Move() noexcept override {
67 return std::make_shared<SHA3_256>(std::move(*this));
68 }
69
70 private:
78 bool DoHash(std::span<const std::byte> input, Buffer::WriteOnly& output) const noexcept override;
79
86 Buffer::Consumer DoHash(Buffer::Consumer consumer, ReadMode mode) const noexcept override;
87 };
88}
A generic hasher class.
Definition generic.hxx:30
A SHA3_256 hasher class.
Definition sha3_256.hxx:14
virtual ~SHA3_256() noexcept=default
Virtual destructor.
SHA3_256(const SHA3_256 &other)=default
Copy constructor.
SHA3_256(SHA3_256 &&other) noexcept=default
Move constructor.
SHA3_256()
Constructor.
Definition sha3_256.hxx:20
PointerType Move() noexcept override
Move the SHA3_256 hasher.
Definition sha3_256.hxx:66