12#ifndef ARCANE_UTILS_IHASHALGORITHM_H
13#define ARCANE_UTILS_IHASHALGORITHM_H
38 static constexpr Int32 MAX_SIZE = 64;
44 return { m_value.data(), m_size };
48 return { m_value.data(), m_size };
52 return {
reinterpret_cast<const Byte*
>(m_value.data()), m_size };
54 void setSize(
Int32 size);
58 std::array<std::byte, MAX_SIZE> m_value = {};
59 Int32 m_size = MAX_SIZE;
175 ARCANE_DEPRECATED_REASON(
"Y2023: Use computeHash64(Span<const std::byte> input,ByteArray& output) instead")
Types and functions associated with the classes SpanImpl, SmallSpan and Span.
Declarations of types used in Arcane.
Hash algorithm return value.
Context for calculating a hash incrementally.
virtual void updateHash(Span< const std::byte > input)=0
Adds the array input to the calculated hash.
virtual void reset()=0
Resets the instance to calculate a new hash value.
virtual void computeHashValue(HashAlgorithmValue &hash_value)=0
Calculates the hash value and returns it in hash_value.
Interface of a hashing algorithm.
virtual bool hasCreateContext() const
Indicates if the implementation supports incremental hashing.
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.
Reference to an instance.
View of an array of elements of type T.
View of an array of elements of type T.
Unicode character string.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
ConstArrayView< Byte > ByteConstArrayView
C equivalent of a 1D array of characters.
unsigned char Byte
Type of a byte.
std::int32_t Int32
Signed integer type of 32 bits.