Logo ROOT  
Reference Guide
sha1.inl File Reference
#include <stdint.h>
#include <string.h>
Include dependency graph for sha1.inl:

Macros

#define blk(block, i)
 
#define R0(v, w, x, y, z, i)
 
#define R1(v, w, x, y, z, i)
 
#define R2(v, w, x, y, z, i)
 
#define R3(v, w, x, y, z, i)
 
#define R4(v, w, x, y, z, i)
 
#define rol(value, bits)   (((value) << (bits)) | ((value) >> (32 - (bits))))
 
#define SHA1_DIGEST_SIZE   20
 

Functions

static uint32_t blk0 (CHAR64LONG16 *block, int i)
 
SHA_API void SHA1_Final (unsigned char *digest, SHA_CTX *context)
 
SHA_API void SHA1_Init (SHA_CTX *context)
 
static void SHA1_Transform (uint32_t state[5], const uint8_t buffer[64])
 
SHA_API void SHA1_Update (SHA_CTX *context, const uint8_t *data, const uint32_t len)
 

Macro Definition Documentation

◆ blk

#define blk (   block,
 
)
Value:
((block)->l[(i)&15] = \
rol((block)->l[((i) + 13) & 15] ^ (block)->l[((i) + 8) & 15] \
^ (block)->l[((i) + 2) & 15] ^ (block)->l[(i)&15], \
1))
constexpr size_t block
Definition: BatchHelpers.h:29
auto * l
Definition: textangle.C:4

Definition at line 124 of file sha1.inl.

◆ R0

#define R0 (   v,
  w,
  x,
  y,
  z,
 
)
Value:
z += ((w & (x ^ y)) ^ y) + blk0(block, i) + 0x5A827999 + rol(v, 5); \
w = rol(w, 30);
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
#define rol(value, bits)
Definition: sha1.inl:100
static uint32_t blk0(CHAR64LONG16 *block, int i)
Definition: sha1.inl:113

Definition at line 131 of file sha1.inl.

◆ R1

#define R1 (   v,
  w,
  x,
  y,
  z,
 
)
Value:
z += ((w & (x ^ y)) ^ y) + blk(block, i) + 0x5A827999 + rol(v, 5); \
w = rol(w, 30);
#define blk(block, i)
Definition: sha1.inl:124

Definition at line 134 of file sha1.inl.

◆ R2

#define R2 (   v,
  w,
  x,
  y,
  z,
 
)
Value:
z += (w ^ x ^ y) + blk(block, i) + 0x6ED9EBA1 + rol(v, 5); \
w = rol(w, 30);

Definition at line 137 of file sha1.inl.

◆ R3

#define R3 (   v,
  w,
  x,
  y,
  z,
 
)
Value:
z += (((w | x) & y) | (w & x)) + blk(block, i) + 0x8F1BBCDC + rol(v, 5); \
w = rol(w, 30);

Definition at line 140 of file sha1.inl.

◆ R4

#define R4 (   v,
  w,
  x,
  y,
  z,
 
)
Value:
z += (w ^ x ^ y) + blk(block, i) + 0xCA62C1D6 + rol(v, 5); \
w = rol(w, 30);

Definition at line 143 of file sha1.inl.

◆ rol

#define rol (   value,
  bits 
)    (((value) << (bits)) | ((value) >> (32 - (bits))))

Definition at line 100 of file sha1.inl.

◆ SHA1_DIGEST_SIZE

#define SHA1_DIGEST_SIZE   20

Definition at line 98 of file sha1.inl.

Function Documentation

◆ blk0()

static uint32_t blk0 ( CHAR64LONG16 *  block,
int  i 
)
static

Definition at line 113 of file sha1.inl.

◆ SHA1_Final()

SHA_API void SHA1_Final ( unsigned char *  digest,
SHA_CTX *  context 
)

Definition at line 298 of file sha1.inl.

◆ SHA1_Init()

SHA_API void SHA1_Init ( SHA_CTX *  context)

Definition at line 258 of file sha1.inl.

◆ SHA1_Transform()

static void SHA1_Transform ( uint32_t  state[5],
const uint8_t  buffer[64] 
)
static

Definition at line 150 of file sha1.inl.

◆ SHA1_Update()

SHA_API void SHA1_Update ( SHA_CTX *  context,
const uint8_t *  data,
const uint32_t  len 
)

Definition at line 271 of file sha1.inl.