Anope IRC Services  Version 2.0
Public Member Functions | Private Member Functions | Private Attributes
SHA1Context Class Reference
Inheritance diagram for SHA1Context:
Inheritance graph
[legend]
Collaboration diagram for SHA1Context:
Collaboration graph
[legend]

Public Member Functions

 SHA1Context (Encryption::IV *iv=NULL)
 
void Update (const unsigned char *data, size_t len) anope_override
 
void Finalize () anope_override
 
Encryption::Hash GetFinalizedHash () anope_override
 
- Public Member Functions inherited from Encryption::Context
virtual ~Context ()
 

Private Member Functions

void Transform (const unsigned char buf[64])
 

Private Attributes

uint32_t state [5]
 
uint32_t count [2]
 
unsigned char buffer [64]
 
unsigned char digest [20]
 

Detailed Description

Definition at line 52 of file enc_sha1.cpp.

Constructor & Destructor Documentation

SHA1Context::SHA1Context ( Encryption::IV iv = NULL)
inline

Definition at line 105 of file enc_sha1.cpp.

References sha1_iv.

Member Function Documentation

void SHA1Context::Finalize ( )
inlinevirtual

Implements Encryption::Context.

Definition at line 144 of file enc_sha1.cpp.

References Transform(), and Update().

Referenced by ESHA1::OnEncrypt().

Encryption::Hash SHA1Context::GetFinalizedHash ( )
inlinevirtual

Implements Encryption::Context.

Definition at line 167 of file enc_sha1.cpp.

References digest.

Referenced by ESHA1::OnEncrypt().

void SHA1Context::Transform ( const unsigned char  buf[64])
inlineprivate

Definition at line 59 of file enc_sha1.cpp.

References CHAR64LONG16::c, R0(), R1(), R2(), R3(), and R4().

Referenced by Finalize(), and Update().

void SHA1Context::Update ( const unsigned char *  data,
size_t  len 
)
inlinevirtual

Implements Encryption::Context.

Definition at line 123 of file enc_sha1.cpp.

References Transform().

Referenced by Finalize(), and ESHA1::OnEncrypt().

Field Documentation

unsigned char SHA1Context::buffer[64]
private

Definition at line 56 of file enc_sha1.cpp.

uint32_t SHA1Context::count[2]
private

Definition at line 55 of file enc_sha1.cpp.

unsigned char SHA1Context::digest[20]
private

Definition at line 57 of file enc_sha1.cpp.

Referenced by GetFinalizedHash().

uint32_t SHA1Context::state[5]
private

Definition at line 54 of file enc_sha1.cpp.


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