Security Scol plugin
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
SHA1 Class Reference

SHA-1 message digest. More...

#include <sha.h>

Inheritance diagram for SHA1:
IteratedHashWithStaticTransform< word32, BigEndian, 64, 20, SHA1 > ClonableImpl< DERIVED, BASE >

Public Member Functions

CRYPTOPP_STATIC_CONSTEXPR const char *CRYPTOPP_API StaticAlgorithmName ()
 The algorithm name.
 
std::string AlgorithmProvider () const
 
- Public Member Functions inherited from IteratedHashWithStaticTransform< word32, BigEndian, 64, 20, SHA1 >
 CRYPTOPP_CONSTANT (DIGESTSIZE=0 ? 0 :T_StateSize)
 
unsigned int DigestSize () const
 Provides the digest size of the hash.
 
- Public Member Functions inherited from ClonableImpl< DERIVED, BASE >
ClonableClone () const
 Create a copy of this object.
 

Static Public Member Functions

static void CRYPTOPP_API InitState (HashWordType *state)
 Initialize state array.
 
static void CRYPTOPP_API Transform (HashWordType *digest, const HashWordType *data)
 Operate the hash.
 

Protected Member Functions

size_t HashMultipleBlocks (const HashWordType *input, size_t length)
 
- Protected Member Functions inherited from IteratedHashWithStaticTransform< word32, BigEndian, 64, 20, SHA1 >
void HashEndianCorrectedBlock (const word32 *data)
 
void Init ()
 
word32StateBuf ()
 

Additional Inherited Members

- Protected Types inherited from IteratedHashWithStaticTransform< word32, BigEndian, 64, 20, SHA1 >
enum  
 
- Protected Attributes inherited from IteratedHashWithStaticTransform< word32, BigEndian, 64, 20, SHA1 >
FixedSizeAlignedSecBlock< word32, Blocks, false > m_state
 

Detailed Description

SHA-1 message digest.

See also
SHA-1
Since
SHA1 since Crypto++ 1.0, SHA2 since Crypto++ 4.0, ARMv8 SHA since Crypto++ 6.0, Intel SHA since Crypto++ 6.0

Definition at line 26 of file sha.h.

Member Function Documentation

◆ AlgorithmProvider()

ANONYMOUS_NAMESPACE_END std::string SHA1::AlgorithmProvider ( ) const

Definition at line 250 of file sha.cpp.

◆ HashMultipleBlocks()

size_t SHA1::HashMultipleBlocks ( const HashWordType *  input,
size_t  length 
)
protected

Definition at line 336 of file sha.cpp.

◆ InitState()

void SHA1::InitState ( HashWordType *  state)
static

Initialize state array.

Parameters
statethe state of the hash

InitState sets a state array to SHA1 initial values

Hashes which derive from IteratedHashWithStaticTransform provide static member functions InitState and Transform. External classes, like SEAL and MDC, can initialize state with a user provided key and operate the hash on the data with the user supplied state.

Note
On Intel platforms the state array must be 16-byte aligned for SSE2.

Definition at line 276 of file sha.cpp.

◆ StaticAlgorithmName()

CRYPTOPP_STATIC_CONSTEXPR const char *CRYPTOPP_API SHA1::StaticAlgorithmName ( )
inline

The algorithm name.

Returns
C-style string "SHA-1"

Definition at line 52 of file sha.h.

◆ Transform()

void SHA1::Transform ( HashWordType *  digest,
const HashWordType *  data 
)
static

Operate the hash.

Parameters
digestthe state of the hash
datathe data to be digested

Transform operates the hash on data. When the call is invoked digest holds initial state. Upon return digest holds the hash or updated state.

Hashes which derive from IteratedHashWithStaticTransform provide static member functions InitState and Transform. External classes, like SEAL and MDC, can initialize state with a user provided key and operate the hash on the data with the user supplied state.

Note
On Intel platforms the state array and data must be 16-byte aligned for SSE2.

Definition at line 285 of file sha.cpp.


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