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