14#include "arcane/utils/IHashAlgorithm.h"
15#include "arcane/utils/FatalErrorException.h"
16#include "arcane/utils/NotImplementedException.h"
17#include "arcane/utils/Array.h"
18#include "arcane/utils/Ref.h"
29void HashAlgorithmValue::
33 ARCANE_FATAL_IF((size > MAX_SIZE),
"Invalid size '{0}' max value is '{1}'", size, MAX_SIZE);
70 const Byte* x =
reinterpret_cast<const Byte*
>(input.
data());
85 for (
Int32 i = 0; i < n; ++i)
86 value_as_bytes[i] =
static_cast<std::byte
>(legacy_bytes[i]);
#define ARCANE_FATAL_IF(const,...)
Macro throwing a FatalErrorException if cond is true.
#define ARCANE_THROW(exception_class,...)
Macro for throwing an exception with formatting.
Integer size() const
Number of elements in the vector.
Hash algorithm return value.
virtual String name() const
Name of the algorithm.
virtual void computeHash(Span< const std::byte > input, HashAlgorithmValue &value)
Calculates the hash value for the array input.
virtual void computeHash64(Span< const Byte > input, ByteArray &output)
Calculates the hash value for the array input.
virtual Int32 hashSize() const
Size (in bytes) of the hash key.
virtual Ref< IHashAlgorithmContext > createContext()
Creates a context to calculate the hash value incrementally.
Exception when a function is not implemented.
Reference to an instance.
View of an array of elements of type T.
constexpr view_type smallView()
Constant view of this view.
constexpr __host__ __device__ pointer data() const noexcept
Pointer to the start of the view.
constexpr __host__ __device__ SizeType size() const noexcept
Returns the size of the array.
View of an array of elements of type T.
Unicode character string.
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
unsigned char Byte
Type of a byte.
std::int32_t Int32
Signed integer type of 32 bits.