Anope IRC Services  Version 2.0
Data Structures | Functions | Variables
enc_sha1.cpp File Reference
#include "module.h"
#include "modules/encryption.h"
Include dependency graph for enc_sha1.cpp:

Go to the source code of this file.

Data Structures

union  CHAR64LONG16
 
class  SHA1Context
 
class  SHA1Provider
 
class  ESHA1
 

Functions

static uint32_t rol (uint32_t value, uint32_t bits)
 
static uint32_t blk0 (CHAR64LONG16 &block, uint32_t i)
 
static uint32_t blk (CHAR64LONG16 &block, uint32_t i)
 
static void R0 (CHAR64LONG16 &block, uint32_t v, uint32_t &w, uint32_t x, uint32_t y, uint32_t &z, uint32_t i)
 
static void R1 (CHAR64LONG16 &block, uint32_t v, uint32_t &w, uint32_t x, uint32_t y, uint32_t &z, uint32_t i)
 
static void R2 (CHAR64LONG16 &block, uint32_t v, uint32_t &w, uint32_t x, uint32_t y, uint32_t &z, uint32_t i)
 
static void R3 (CHAR64LONG16 &block, uint32_t v, uint32_t &w, uint32_t x, uint32_t y, uint32_t &z, uint32_t i)
 
static void R4 (CHAR64LONG16 &block, uint32_t v, uint32_t &w, uint32_t x, uint32_t y, uint32_t &z, uint32_t i)
 

Variables

static const uint32_t sha1_iv [5]
 

Function Documentation

static uint32_t blk ( CHAR64LONG16 block,
uint32_t  i 
)
inlinestatic

Definition at line 38 of file enc_sha1.cpp.

References CHAR64LONG16::l, and rol().

Referenced by R1(), R2(), R3(), and R4().

static uint32_t blk0 ( CHAR64LONG16 block,
uint32_t  i 
)
inlinestatic

Definition at line 30 of file enc_sha1.cpp.

References CHAR64LONG16::l, and rol().

Referenced by R0().

static void R0 ( CHAR64LONG16 block,
uint32_t  v,
uint32_t &  w,
uint32_t  x,
uint32_t  y,
uint32_t &  z,
uint32_t  i 
)
inlinestatic

Definition at line 41 of file enc_sha1.cpp.

References blk0(), and rol().

Referenced by SHA1Context::Transform().

static void R1 ( CHAR64LONG16 block,
uint32_t  v,
uint32_t &  w,
uint32_t  x,
uint32_t  y,
uint32_t &  z,
uint32_t  i 
)
inlinestatic

Definition at line 42 of file enc_sha1.cpp.

References blk(), and rol().

Referenced by SHA1Context::Transform().

static void R2 ( CHAR64LONG16 block,
uint32_t  v,
uint32_t &  w,
uint32_t  x,
uint32_t  y,
uint32_t &  z,
uint32_t  i 
)
inlinestatic

Definition at line 43 of file enc_sha1.cpp.

References blk(), and rol().

Referenced by SHA1Context::Transform().

static void R3 ( CHAR64LONG16 block,
uint32_t  v,
uint32_t &  w,
uint32_t  x,
uint32_t  y,
uint32_t &  z,
uint32_t  i 
)
inlinestatic

Definition at line 44 of file enc_sha1.cpp.

References blk(), and rol().

Referenced by SHA1Context::Transform().

static void R4 ( CHAR64LONG16 block,
uint32_t  v,
uint32_t &  w,
uint32_t  x,
uint32_t  y,
uint32_t &  z,
uint32_t  i 
)
inlinestatic

Definition at line 45 of file enc_sha1.cpp.

References blk(), and rol().

Referenced by SHA1Context::Transform().

static uint32_t rol ( uint32_t  value,
uint32_t  bits 
)
inlinestatic

Definition at line 26 of file enc_sha1.cpp.

Referenced by blk(), blk0(), R0(), R1(), R2(), R3(), and R4().

Variable Documentation

const uint32_t sha1_iv[5]
static
Initial value:
=
{
0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0
}

Definition at line 47 of file enc_sha1.cpp.

Referenced by SHA1Provider::GetDefaultIV(), and SHA1Context::SHA1Context().