Luanti 5.16.0-dev
Loading...
Searching...
No Matches
SHA1 Class Reference

#include <sha1.h>

Public Member Functions

 SHA1 ()
 ~SHA1 ()
void addBytes (const char *data, Uint32 num)
void addBytes (std::string_view data)
void getDigest (unsigned char *to)
std::string getDigest ()

Private Member Functions

void process ()

Private Attributes

Uint32 H0 = 0x67452301
Uint32 H1 = 0xefcdab89
Uint32 H2 = 0x98badcfe
Uint32 H3 = 0x10325476
Uint32 H4 = 0xc3d2e1f0
unsigned char bytes [64]
Uint32 unprocessedBytes = 0
Uint32 size = 0

Constructor & Destructor Documentation

◆ SHA1()

SHA1::SHA1 ( )

◆ ~SHA1()

SHA1::~SHA1 ( )

References bytes, H0, H1, H2, H3, H4, size, and unprocessedBytes.

Member Function Documentation

◆ addBytes() [1/2]

void SHA1::addBytes ( const char * data,
Uint32 num )

References bytes, process(), size, and unprocessedBytes.

Referenced by addBytes(), and getDigest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addBytes() [2/2]

void SHA1::addBytes ( std::string_view data)
inline

References addBytes().

Here is the call graph for this function:

◆ getDigest() [1/2]

std::string SHA1::getDigest ( )
inline

References getDigest().

Referenced by getDigest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDigest() [2/2]

void SHA1::getDigest ( unsigned char * to)

References addBytes(), H0, H1, H2, H3, H4, size, and unprocessedBytes.

Here is the call graph for this function:

◆ process()

void SHA1::process ( )
private

References bytes, H0, H1, H2, H3, H4, and unprocessedBytes.

Referenced by addBytes().

Here is the caller graph for this function:

Member Data Documentation

◆ bytes

unsigned char SHA1::bytes[64]
private

Referenced by ~SHA1(), addBytes(), and process().

◆ H0

Uint32 SHA1::H0 = 0x67452301
private

Referenced by ~SHA1(), getDigest(), and process().

◆ H1

Uint32 SHA1::H1 = 0xefcdab89
private

Referenced by ~SHA1(), getDigest(), and process().

◆ H2

Uint32 SHA1::H2 = 0x98badcfe
private

Referenced by ~SHA1(), getDigest(), and process().

◆ H3

Uint32 SHA1::H3 = 0x10325476
private

Referenced by ~SHA1(), getDigest(), and process().

◆ H4

Uint32 SHA1::H4 = 0xc3d2e1f0
private

Referenced by ~SHA1(), getDigest(), and process().

◆ size

Uint32 SHA1::size = 0
private

Referenced by ~SHA1(), addBytes(), and getDigest().

◆ unprocessedBytes

Uint32 SHA1::unprocessedBytes = 0
private

Referenced by ~SHA1(), addBytes(), getDigest(), and process().


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