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