Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::SHA1HashAlgorithm Class Reference

Implementation of the SHA-1 algorithm. More...

#include <arcane/utils/SHA1HashAlgorithm.h>

Public Member Functions

void computeHash (Span< const std::byte > input, HashAlgorithmValue &value) override
 Calculates the hash value for the array input.
void computeHash (ByteConstArrayView input, ByteArray &output) override
 Calculates the hash value for the array input.
void computeHash64 (Span< const Byte > input, ByteArray &output) override
 Calculates the hash value for the array input.
void computeHash64 (Span< const std::byte > input, ByteArray &output) override
 Calculates the hash value for the array input.
String name () const override
 Name of the algorithm.
Int32 hashSize () const override
 Size (in bytes) of the hash key.
Ref< IHashAlgorithmContextcreateContext () override
 Creates a context to calculate the hash value incrementally.
bool hasCreateContext () const override
 Indicates if the implementation supports incremental hashing.

Detailed Description

Implementation of the SHA-1 algorithm.

Definition at line 37 of file SHA1HashAlgorithm.h.

Member Function Documentation

◆ computeHash() [1/2]

void Arcane::SHA1HashAlgorithm::computeHash ( ByteConstArrayView input,
ByteArray & output )
overridevirtual

Calculates the hash value for the array input.

The hash value is added to output. The length depends on the algorithm used.

Implements Arcane::IHashAlgorithm.

Definition at line 534 of file SHA1HashAlgorithm.cc.

References Arcane::asBytes().

◆ computeHash() [2/2]

void Arcane::SHA1HashAlgorithm::computeHash ( Span< const std::byte > input,
HashAlgorithmValue & value )
overridevirtual

Calculates the hash value for the array input.

The hash value is positioned in value

Reimplemented from Arcane::IHashAlgorithm.

Definition at line 525 of file SHA1HashAlgorithm.cc.

◆ computeHash64() [1/2]

void Arcane::SHA1HashAlgorithm::computeHash64 ( Span< const Byte > input,
ByteArray & output )
overridevirtual

Calculates the hash value for the array input.

The hash value is added to output. The added length is equal to hashSize().

Reimplemented from Arcane::IHashAlgorithm.

Definition at line 544 of file SHA1HashAlgorithm.cc.

References Arcane::asBytes().

◆ computeHash64() [2/2]

void Arcane::SHA1HashAlgorithm::computeHash64 ( Span< const std::byte > input,
ByteArray & output )
overridevirtual

Calculates the hash value for the array input.

The hash value is added to output. The added length is equal to hashSize().

Reimplemented from Arcane::IHashAlgorithm.

Definition at line 554 of file SHA1HashAlgorithm.cc.

◆ createContext()

Ref< IHashAlgorithmContext > Arcane::SHA1HashAlgorithm::createContext ( )
overridevirtual

Creates a context to calculate the hash value incrementally.

If the implementation does not support incremental mode (hasCreateContext()==false), an exception is thrown.

Reimplemented from Arcane::IHashAlgorithm.

Definition at line 563 of file SHA1HashAlgorithm.cc.

References Arcane::createRef().

◆ hasCreateContext()

bool Arcane::SHA1HashAlgorithm::hasCreateContext ( ) const
inlineoverridevirtual

Indicates if the implementation supports incremental hashing.

Reimplemented from Arcane::IHashAlgorithm.

Definition at line 49 of file SHA1HashAlgorithm.h.

◆ hashSize()

Int32 Arcane::SHA1HashAlgorithm::hashSize ( ) const
inlineoverridevirtual

Size (in bytes) of the hash key.

Reimplemented from Arcane::IHashAlgorithm.

Definition at line 47 of file SHA1HashAlgorithm.h.

◆ name()

String Arcane::SHA1HashAlgorithm::name ( ) const
inlineoverridevirtual

Name of the algorithm.

Reimplemented from Arcane::IHashAlgorithm.

Definition at line 46 of file SHA1HashAlgorithm.h.


The documentation for this class was generated from the following files: