-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,36 @@ | ||
|
||
|
||
#ifndef SUPERGENIUS_SRC_CRYPTO_HASHER_HASHER_IMPL_HPP_ | ||
#define SUPERGENIUS_SRC_CRYPTO_HASHER_HASHER_IMPL_HPP_ | ||
|
||
#include "crypto/hasher.hpp" | ||
|
||
namespace sgns::crypto { | ||
|
||
class HasherImpl : public Hasher { | ||
public: | ||
~HasherImpl() override = default; | ||
namespace sgns::crypto | ||
{ | ||
class HasherImpl : public Hasher | ||
{ | ||
public: | ||
~HasherImpl() override = default; | ||
|
||
//----------------------------- | ||
Hash64 twox_64(gsl::span<const uint8_t> buffer) const override; | ||
[[nodiscard]] Hash64 twox_64( gsl::span<const uint8_t> buffer ) const override; | ||
|
||
Hash128 twox_128(gsl::span<const uint8_t> buffer) const override; | ||
[[nodiscard]] Hash128 twox_128( gsl::span<const uint8_t> buffer ) const override; | ||
|
||
Hash128 blake2b_128(gsl::span<const uint8_t> buffer) const override; | ||
//---------------------------- | ||
Hash256 twox_256(gsl::span<const uint8_t> buffer) const override; | ||
[[nodiscard]] Hash128 blake2b_128( gsl::span<const uint8_t> buffer ) const override; | ||
|
||
Hash256 blake2b_256(gsl::span<const uint8_t> buffer) const override; | ||
[[nodiscard]] Hash256 twox_256( gsl::span<const uint8_t> buffer ) const override; | ||
|
||
Hash256 keccak_256(gsl::span<const uint8_t> buffer) const override; | ||
[[nodiscard]] Hash256 blake2b_256( gsl::span<const uint8_t> buffer ) const override; | ||
|
||
Hash256 blake2s_256(gsl::span<const uint8_t> buffer) const override; | ||
[[nodiscard]] Hash256 keccak_256( gsl::span<const uint8_t> buffer ) const override; | ||
|
||
Hash256 sha2_256(gsl::span<const uint8_t> buffer) const override; | ||
[[nodiscard]] Hash256 blake2s_256( gsl::span<const uint8_t> buffer ) const override; | ||
|
||
std::string GetName() override | ||
{ | ||
return "HasherImpl"; | ||
} | ||
}; | ||
[[nodiscard]] Hash256 sha2_256( gsl::span<const uint8_t> buffer ) const override; | ||
|
||
} // namespace sgns::hash | ||
std::string GetName() override | ||
{ | ||
return "HasherImpl"; | ||
} | ||
}; | ||
} | ||
|
||
#endif // SUPERGENIUS_SRC_CRYPTO_HASHER_HASHER_IMPL_HPP_ | ||
#endif |