Interface of a hashing algorithm. More...
#include <arcane/utils/IHashAlgorithm.h>
Public Member Functions | |
| virtual String | name () const |
| Name of the algorithm. | |
| virtual Int32 | hashSize () const |
| Size (in bytes) of the hash key. | |
| virtual void | computeHash64 (Span< const Byte > input, ByteArray &output) |
| Calculates the hash value for the array input. | |
| virtual void | computeHash64 (Span< const std::byte > input, ByteArray &output) |
| Calculates the hash value for the array input. | |
| virtual void | computeHash (Span< const std::byte > input, HashAlgorithmValue &value) |
| Calculates the hash value for the array input. | |
| virtual Ref< IHashAlgorithmContext > | createContext () |
| Creates a context to calculate the hash value incrementally. | |
| virtual bool | hasCreateContext () const |
| Indicates if the implementation supports incremental hashing. | |
| virtual void | computeHash (ByteConstArrayView input, ByteArray &output)=0 |
| Calculates the hash value for the array input. | |
Interface of a hashing algorithm.
Definition at line 108 of file IHashAlgorithm.h.
|
pure virtual |
Calculates the hash value for the array input.
The hash value is added to output. The length depends on the algorithm used.
Implemented in Arcane::MD5HashAlgorithm, Arcane::SHA1HashAlgorithm, and Arcane::SHA3HashAlgorithm.
References computeHash().
|
virtual |
Calculates the hash value for the array input.
The hash value is positioned in value
Reimplemented in Arcane::SHA1HashAlgorithm.
Definition at line 77 of file HashAlgorithm.cc.
References computeHash64(), and Arcane::AbstractArray< T >::size().
Referenced by computeHash(), and computeHash64().
Calculates the hash value for the array input.
The hash value is added to output. The added length is equal to hashSize().
Reimplemented in Arcane::MD5HashAlgorithm, Arcane::SHA1HashAlgorithm, and Arcane::SHA3HashAlgorithm.
Definition at line 58 of file HashAlgorithm.cc.
References computeHash(), and Arcane::SpanImpl< T, SizeType, Extent >::smallView().
Referenced by Arcane::MeshUtils::checkUniqueIdsHashCollective(), computeHash(), Arcane::SerializedData::computeHash(), and computeHash64().
|
virtual |
Calculates the hash value for the array input.
The hash value is added to output. The added length is equal to hashSize().
Reimplemented in Arcane::MD5HashAlgorithm, Arcane::SHA1HashAlgorithm, and Arcane::SHA3HashAlgorithm.
Definition at line 67 of file HashAlgorithm.cc.
References computeHash64(), Arcane::SpanImpl< T, SizeType, Extent >::data(), and Arcane::SpanImpl< T, SizeType, Extent >::size().
|
virtual |
Creates a context to calculate the hash value incrementally.
If the implementation does not support incremental mode (hasCreateContext()==false), an exception is thrown.
Reimplemented in Arcane::SHA1HashAlgorithm.
Definition at line 92 of file HashAlgorithm.cc.
|
inlinevirtual |
Indicates if the implementation supports incremental hashing.
Reimplemented in Arcane::SHA1HashAlgorithm.
Definition at line 165 of file IHashAlgorithm.h.
|
virtual |
Size (in bytes) of the hash key.
Reimplemented in Arcane::MD5HashAlgorithm, Arcane::SHA1HashAlgorithm, Arcane::SHA3_224HashAlgorithm, Arcane::SHA3_256HashAlgorithm, Arcane::SHA3_384HashAlgorithm, and Arcane::SHA3_512HashAlgorithm.
Definition at line 49 of file HashAlgorithm.cc.
References ARCANE_THROW.
|
virtual |
Name of the algorithm.
Reimplemented in Arcane::MD5HashAlgorithm, Arcane::SHA1HashAlgorithm, Arcane::SHA3_224HashAlgorithm, Arcane::SHA3_256HashAlgorithm, Arcane::SHA3_384HashAlgorithm, and Arcane::SHA3_512HashAlgorithm.
Definition at line 40 of file HashAlgorithm.cc.
References ARCANE_THROW.