Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
SHA1Util.cpp File Reference

Functions

static uint32_t rol (const uint32_t VALUE, const size_t BITS)
 
static uint32_t blk (const uint32_t block[BLOCK_INTS], const size_t I)
 
static void R0 (const uint32_t block[BLOCK_INTS], const uint32_t V, uint32_t &w, const uint32_t X, const uint32_t Y, uint32_t &z, const size_t I)
 
static void R1 (uint32_t block[BLOCK_INTS], const uint32_t V, uint32_t &w, const uint32_t X, const uint32_t Y, uint32_t &z, const size_t I)
 
static void R2 (uint32_t block[BLOCK_INTS], const uint32_t V, uint32_t &w, const uint32_t X, const uint32_t Y, uint32_t &z, const size_t I)
 
static void R3 (uint32_t block[BLOCK_INTS], const uint32_t V, uint32_t &w, const uint32_t X, const uint32_t Y, uint32_t &z, const size_t I)
 
static void R4 (uint32_t block[BLOCK_INTS], const uint32_t V, uint32_t &w, const uint32_t X, const uint32_t Y, uint32_t &z, const size_t I)
 
static void transform (SHA1Context *ctx, uint32_t *block)
 
static void buffer_to_block (const uint8_t *buffer, uint32_t block[BLOCK_INTS])
 
char toChar (unsigned char ch, bool is_cap)
 

Variables

static const size_t BLOCK_INTS = 16
 

Function Documentation

◆ blk()

static uint32_t blk ( const uint32_t block[BLOCK_INTS],
const size_t I )
inlinestatic

References rol().

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

◆ buffer_to_block()

static void buffer_to_block ( const uint8_t * buffer,
uint32_t block[BLOCK_INTS] )
inlinestatic

References BLOCK_INTS.

Referenced by sese::SHA1Util::encode().

◆ R0()

static void R0 ( const uint32_t block[BLOCK_INTS],
const uint32_t V,
uint32_t & w,
const uint32_t X,
const uint32_t Y,
uint32_t & z,
const size_t I )
inlinestatic

References rol().

Referenced by transform().

◆ R1()

static void R1 ( uint32_t block[BLOCK_INTS],
const uint32_t V,
uint32_t & w,
const uint32_t X,
const uint32_t Y,
uint32_t & z,
const size_t I )
inlinestatic

References blk(), and rol().

Referenced by transform().

◆ R2()

static void R2 ( uint32_t block[BLOCK_INTS],
const uint32_t V,
uint32_t & w,
const uint32_t X,
const uint32_t Y,
uint32_t & z,
const size_t I )
inlinestatic

References blk(), and rol().

Referenced by transform().

◆ R3()

static void R3 ( uint32_t block[BLOCK_INTS],
const uint32_t V,
uint32_t & w,
const uint32_t X,
const uint32_t Y,
uint32_t & z,
const size_t I )
inlinestatic

References blk(), and rol().

Referenced by transform().

◆ R4()

static void R4 ( uint32_t block[BLOCK_INTS],
const uint32_t V,
uint32_t & w,
const uint32_t X,
const uint32_t Y,
uint32_t & z,
const size_t I )
inlinestatic

References blk(), and rol().

Referenced by transform().

◆ rol()

static uint32_t rol ( const uint32_t VALUE,
const size_t BITS )
inlinestatic

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

◆ toChar()

char toChar ( unsigned char ch,
bool is_cap )
inline

◆ transform()

static void transform ( SHA1Context * ctx,
uint32_t * block )
inlinestatic

References a, b, c, d, e, sese::SHA1Context::h, R0(), R1(), R2(), R3(), and R4().

Referenced by sese::SHA1Util::encode().

Variable Documentation

◆ BLOCK_INTS

const size_t BLOCK_INTS = 16
static
Note
Implementation of this file is based on https://github.com/vog/sha1

Referenced by buffer_to_block().