A generic hasher class.
More...
#include <generic.hxx>
|
| | Generic (const Generic &other)=default |
| | Copy constructor.
|
| |
| | Generic (Generic &&other) noexcept=default |
| | Move constructor.
|
| |
|
virtual | ~Generic () noexcept=default |
| | Virtual destructor.
|
| |
| Generic & | operator= (const Generic &other)=default |
| | Copy assignment operator.
|
| |
| Generic & | operator= (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.
|
| |
|
|
enum Type | m_type |
| | The type of hasher.
|
| |
◆ Generic() [1/3]
| StormByte::Crypto::Hasher::Generic::Generic |
( |
const Generic & |
other | ) |
|
|
default |
Copy constructor.
- Parameters
-
| other | The other Generic hasher to copy from. |
◆ Generic() [2/3]
| StormByte::Crypto::Hasher::Generic::Generic |
( |
Generic && |
other | ) |
|
|
defaultnoexcept |
Move constructor.
- Parameters
-
| other | The other Generic hasher to move from. |
◆ Generic() [3/3]
| StormByte::Crypto::Hasher::Generic::Generic |
( |
enum Type |
type | ) |
|
|
inlineprotected |
◆ Hash() [1/4]
| Buffer::Consumer StormByte::Crypto::Hasher::Generic::Hash |
( |
Buffer::Consumer |
consumer, |
|
|
ReadMode |
mode = ReadMode::Move |
|
) |
| const |
|
inlinenoexcept |
Hash data from a Consumer buffer.
- Parameters
-
| consumer | The Consumer buffer to hash. |
| mode | The read mode indicating copy or move. |
- Returns
- A Consumer buffer containing the hashed data.
◆ Hash() [2/4]
| bool StormByte::Crypto::Hasher::Generic::Hash |
( |
Buffer::ReadOnly & |
input, |
|
|
Buffer::WriteOnly & |
output |
|
) |
| const |
|
inlinenoexcept |
Hash data from input buffer to output buffer, moving the input data.
- Parameters
-
| input | The input buffer to hash. |
| output | The output buffer to write the hashed data to. |
- Returns
- true if hashing was successful, false otherwise.
◆ Hash() [3/4]
| bool StormByte::Crypto::Hasher::Generic::Hash |
( |
const Buffer::ReadOnly & |
input, |
|
|
Buffer::WriteOnly & |
output |
|
) |
| const |
|
inlinenoexcept |
Hash data from input buffer to output buffer.
- Parameters
-
| input | The input buffer to hash. |
| output | The output buffer to write the hashed data to. |
- Returns
- true if hashing was successful, false otherwise.
◆ Hash() [4/4]
| bool StormByte::Crypto::Hasher::Generic::Hash |
( |
std::span< const std::byte > |
input, |
|
|
Buffer::WriteOnly & |
output |
|
) |
| const |
|
inlinenoexcept |
Hash data from input buffer to output buffer.
- Parameters
-
| input | The input buffer to hash. |
| output | The output buffer to write the hashed data to. |
- Returns
- true if hashing was successful, false otherwise.
◆ operator=() [1/2]
| Generic & StormByte::Crypto::Hasher::Generic::operator= |
( |
const Generic & |
other | ) |
|
|
default |
Copy assignment operator.
- Parameters
-
| other | The other Generic hasher to copy from. |
- Returns
- Reference to this Generic hasher.
◆ operator=() [2/2]
| Generic & StormByte::Crypto::Hasher::Generic::operator= |
( |
Generic && |
other | ) |
|
|
defaultnoexcept |
Move assignment operator.
- Parameters
-
| other | The other Generic hasher to move from. |
- Returns
- Reference to this Generic hasher.
◆ Type()
| enum Type StormByte::Crypto::Hasher::Generic::Type |
( |
| ) |
const |
|
inlinenoexcept |
Gets the type of hasher.
- Returns
- The type of hasher.
The documentation for this class was generated from the following file:
- /home/runner/work/StormByte-Crypto/StormByte-Crypto/lib/public/StormByte/crypto/hasher/generic.hxx