StormByte-Crypto 3.1.0
C++26 cryptography module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Crypto::Hasher::SHA3_256 Class Referencefinal

SHA3-256 hasher. More...

#include <StormByte/crypto/hasher/sha3_256.hxx>

Inheritance diagram for StormByte::Crypto::Hasher::SHA3_256:
Collaboration diagram for StormByte::Crypto::Hasher::SHA3_256:

Public Member Functions

PointerType Clone () const noexcept override
 Clone this hasher.
PointerType Move () noexcept override
 Move this hasher into a new instance.
Construction
 SHA3_256 ()
 Default constructor.
 SHA3_256 (const SHA3_256 &other)=default
 Copy constructor.
 SHA3_256 (SHA3_256 &&other) noexcept=default
 Move constructor.
 ~SHA3_256 () noexcept
 Destructor.
SHA3_256 & operator= (const SHA3_256 &other)=default
 Copy assignment.
SHA3_256 & operator= (SHA3_256 &&other) noexcept=default
 Move assignment.
Public Member Functions inherited from StormByte::Crypto::Hasher::Generic
 Generic (const Generic &other)=default
 Copy constructor.
 Generic (Generic &&other) noexcept=default
 Move constructor.
virtual ~Generic () noexcept
 Destructor.
Generic & operator= (const Generic &other)=default
 Copy assignment.
Generic & operator= (Generic &&other) noexcept=default
 Move assignment.
bool Hash (std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept
 Hash a byte span into an output buffer.
template<StormByte::Type::ByteInputRange Range>
bool Hash (const Range &input, Buffer::WriteOnly &output) const
 Hash an input range of byte-convertible values.
bool Hash (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Hash a read-only buffer (copy).
bool Hash (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Hash a buffer, consuming it.
Buffer::Consumer Hash (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept
 Hash a Consumer into another Consumer.
enum Type Type () const noexcept
 Algorithm of this hasher.
Public Member Functions inherited from StormByte::Safe::Clonable< Generic >
constexpr Clonable ()=default
constexpr Clonable & operator= (const Clonable &)=default
virtual constexpr ~Clonable () noexcept=default

Additional Inherited Members

Public Types inherited from StormByte::Safe::Clonable< Generic >
typedef SmartPointer PointerType
Static Public Member Functions inherited from StormByte::Safe::Clonable< Generic >
static PointerType MakePointer (Args &&... args)
Protected Member Functions inherited from StormByte::Crypto::Hasher::Generic
 Generic (enum Type type)
 Construct with an algorithm.
Protected Attributes inherited from StormByte::Crypto::Hasher::Generic
enum Type m_type
 Algorithm.

Detailed Description

SHA3-256 hasher.

Note
MaybeSafe inherits all provider requirements of StormByte::Crypto::Hasher::Generic. This leaf adds no fields; exported Clone/Move bind ownership callbacks in Crypto.

Constructor & Destructor Documentation

◆ SHA3_256() [1/3]

StormByte::Crypto::Hasher::SHA3_256::SHA3_256 ( )
inline

Default constructor.

◆ SHA3_256() [2/3]

StormByte::Crypto::Hasher::SHA3_256::SHA3_256 ( const SHA3_256 & other)
default

Copy constructor.

Parameters
otherHasher to copy.

◆ SHA3_256() [3/3]

StormByte::Crypto::Hasher::SHA3_256::SHA3_256 ( SHA3_256 && other)
defaultnoexcept

Move constructor.

Parameters
otherHasher to move.

◆ ~SHA3_256()

StormByte::Crypto::Hasher::SHA3_256::~SHA3_256 ( )
noexcept

Destructor.

Member Function Documentation

◆ Clone()

PointerType StormByte::Crypto::Hasher::SHA3_256::Clone ( ) const
overridevirtualnoexcept

Clone this hasher.

Returns
Shared pointer to the clone.

Implements StormByte::Safe::Clonable< Generic >.

◆ Move()

PointerType StormByte::Crypto::Hasher::SHA3_256::Move ( )
overridevirtualnoexcept

Move this hasher into a new instance.

Returns
Shared pointer to the moved hasher.

Implements StormByte::Safe::Clonable< Generic >.

◆ operator=() [1/2]

SHA3_256 & StormByte::Crypto::Hasher::SHA3_256::operator= ( const SHA3_256 & other)
default

Copy assignment.

Parameters
otherHasher to copy.
Returns
Reference to this hasher.

◆ operator=() [2/2]

SHA3_256 & StormByte::Crypto::Hasher::SHA3_256::operator= ( SHA3_256 && other)
defaultnoexcept

Move assignment.

Parameters
otherHasher to move.
Returns
Reference to this hasher.

The documentation for this class was generated from the following file: