Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

A hasher class for SHA1. More...

#include <sha1.h>

Public Member Functions

 CSHA1 ()
 
CSHA1Write (const unsigned char *data, size_t len)
 
void Finalize (unsigned char hash[OUTPUT_SIZE])
 
CSHA1Reset ()
 

Static Public Attributes

static const size_t OUTPUT_SIZE = 20
 

Private Attributes

uint32_t s [5]
 
unsigned char buf [64]
 
uint64_t bytes
 

Detailed Description

A hasher class for SHA1.

Definition at line 12 of file sha1.h.

Constructor & Destructor Documentation

◆ CSHA1()

CSHA1::CSHA1 ( )

Definition at line 149 of file sha1.cpp.

References s.

Member Function Documentation

◆ Finalize()

void CSHA1::Finalize ( unsigned char  hash[OUTPUT_SIZE])

Definition at line 180 of file sha1.cpp.

References bytes, s, Write(), WriteBE32(), and WriteBE64().

◆ Reset()

CSHA1 & CSHA1::Reset ( )

Definition at line 194 of file sha1.cpp.

References bytes, and s.

◆ Write()

CSHA1 & CSHA1::Write ( const unsigned char *  data,
size_t  len 
)

Definition at line 154 of file sha1.cpp.

References buf, bytes, memcpy(), s, and sha256_shani::Transform().

Referenced by EvalScript(), Finalize(), and HASH_SHA1().

Member Data Documentation

◆ buf

unsigned char CSHA1::buf[64]
private

Definition at line 16 of file sha1.h.

Referenced by Write().

◆ bytes

uint64_t CSHA1::bytes
private

Definition at line 17 of file sha1.h.

Referenced by Finalize(), Reset(), and Write().

◆ OUTPUT_SIZE

const size_t CSHA1::OUTPUT_SIZE = 20
static

Definition at line 20 of file sha1.h.

Referenced by HASH_SHA1().

◆ s

uint32_t CSHA1::s[5]
private

Definition at line 15 of file sha1.h.

Referenced by CSHA1(), Finalize(), Reset(), and Write().


The documentation for this class was generated from the following files:
Released under the MIT license