StormByte C++ Library: Crypto module 0.0.9999
StormByte-Crypto is a StormByte library module for handling cryptographic operations
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StormByte::Crypto::Hasher::SHA256 Class Referencefinal

A SHA256 hasher class. More...

#include <sha256.hxx>

Inheritance diagram for StormByte::Crypto::Hasher::SHA256:
Inheritance graph
[legend]
Collaboration diagram for StormByte::Crypto::Hasher::SHA256:
Collaboration graph
[legend]

Public Member Functions

 SHA256 ()
 Constructor.
 
 SHA256 (const SHA256 &other)=default
 Copy constructor.
 
 SHA256 (SHA256 &&other) noexcept=default
 Move constructor.
 
virtual ~SHA256 () noexcept=default
 Virtual destructor.
 
SHA256operator= (const SHA256 &other)=default
 Copy assignment operator.
 
SHA256operator= (SHA256 &&other) noexcept=default
 Move assignment operator.
 
PointerType Clone () const noexcept override
 Clone the SHA256 hasher.
 
PointerType Move () noexcept override
 
- 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=default
 Virtual destructor.
 
Genericoperator= (const Generic &other)=default
 Copy assignment operator.
 
Genericoperator= (Generic &&other) noexcept=default
 Move assignment operator.
 
bool Hash (std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept
 Hash data from input buffer to output buffer.
 
bool Hash (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Hash data from input buffer to output buffer.
 
bool Hash (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Hash data from input buffer to output buffer, moving the input data.
 
Buffer::Consumer Hash (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept
 Hash data from a Consumer buffer.
 
enum Type Type () const noexcept
 Gets the type of hasher.
 

Additional Inherited Members

- Protected Member Functions inherited from StormByte::Crypto::Hasher::Generic
 Generic (enum Type type)
 Constructor.
 
- Protected Attributes inherited from StormByte::Crypto::Hasher::Generic
enum Type m_type
 The type of hasher.
 

Detailed Description

A SHA256 hasher class.

Constructor & Destructor Documentation

◆ SHA256() [1/3]

StormByte::Crypto::Hasher::SHA256::SHA256 ( )
inline

Constructor.

Parameters
typeThe type of hasher.

◆ SHA256() [2/3]

StormByte::Crypto::Hasher::SHA256::SHA256 ( const SHA256 other)
default

Copy constructor.

Parameters
otherThe other SHA256 hasher to copy from.

◆ SHA256() [3/3]

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

Move constructor.

Parameters
otherThe other SHA256 hasher to move from.

Member Function Documentation

◆ Clone()

PointerType StormByte::Crypto::Hasher::SHA256::Clone ( ) const
inlineoverridenoexcept

Clone the SHA256 hasher.

Returns
A pointer to the cloned SHA256 hasher.

◆ Move()

PointerType StormByte::Crypto::Hasher::SHA256::Move ( )
inlineoverridenoexcept

@brieg Move the SHA256 hasher.

Returns
A pointer to the moved SHA256 hasher.

◆ operator=() [1/2]

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

Copy assignment operator.

Parameters
otherThe other SHA256 hasher to copy from.
Returns
Reference to this SHA256 hasher.

◆ operator=() [2/2]

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

Move assignment operator.

Parameters
otherThe other SHA256 hasher to move from.
Returns
Reference to this SHA256 hasher.

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