StormByte C++ Library: Crypto module 0.0.9999
StormByte-Crypto is a StormByte library module for handling cryptographic operations
Loading...
Searching...
No Matches
sha3_512.hxx
1#pragma once
2
3#include <StormByte/crypto/hasher/generic.hxx>
4
9namespace StormByte::Crypto::Hasher {
14 class STORMBYTE_CRYPTO_PUBLIC SHA3_512 final: public Generic {
15 public:
20 inline SHA3_512():
21 Generic(Type::SHA3_512) {}
22
27 SHA3_512(const SHA3_512& other) = default;
28
33 SHA3_512(SHA3_512&& other) noexcept = default;
34
38 virtual ~SHA3_512() noexcept = default;
39
45 SHA3_512& operator=(const SHA3_512& other) = default;
46
52 SHA3_512& operator=(SHA3_512&& other) noexcept = default;
53
58 inline PointerType Clone() const noexcept override {
59 return std::make_shared<SHA3_512>(*this);
60 }
61
66 inline PointerType Move() noexcept override {
67 return std::make_shared<SHA3_512>(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_512 hasher class.
Definition sha3_512.hxx:14
PointerType Move() noexcept override
Move the SHA3_512 hasher.
Definition sha3_512.hxx:66
SHA3_512()
Constructor.
Definition sha3_512.hxx:20
virtual ~SHA3_512() noexcept=default
Virtual destructor.
SHA3_512(const SHA3_512 &other)=default
Copy constructor.
SHA3_512(SHA3_512 &&other) noexcept=default
Move constructor.