LLVM 20.0.0git
Macros | Functions
SHA1.cpp File Reference
#include "llvm/Support/SHA1.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/SwapByteOrder.h"
#include <string.h>

Go to the source code of this file.

Macros

#define SHA1_K0   0x5a827999
 
#define SHA1_K20   0x6ed9eba1
 
#define SHA1_K40   0x8f1bbcdc
 
#define SHA1_K60   0xca62c1d6
 
#define SEED_0   0x67452301
 
#define SEED_1   0xefcdab89
 
#define SEED_2   0x98badcfe
 
#define SEED_3   0x10325476
 
#define SEED_4   0xc3d2e1f0
 

Functions

static uint32_t rol (uint32_t Number, int Bits)
 
static uint32_t blk0 (uint32_t *Buf, int I)
 
static uint32_t blk (uint32_t *Buf, int I)
 
static void r0 (uint32_t &A, uint32_t &B, uint32_t &C, uint32_t &D, uint32_t &E, int I, uint32_t *Buf)
 
static void r1 (uint32_t &A, uint32_t &B, uint32_t &C, uint32_t &D, uint32_t &E, int I, uint32_t *Buf)
 
static void r2 (uint32_t &A, uint32_t &B, uint32_t &C, uint32_t &D, uint32_t &E, int I, uint32_t *Buf)
 
static void r3 (uint32_t &A, uint32_t &B, uint32_t &C, uint32_t &D, uint32_t &E, int I, uint32_t *Buf)
 
static void r4 (uint32_t &A, uint32_t &B, uint32_t &C, uint32_t &D, uint32_t &E, int I, uint32_t *Buf)
 

Macro Definition Documentation

◆ SEED_0

#define SEED_0   0x67452301

Definition at line 75 of file SHA1.cpp.

◆ SEED_1

#define SEED_1   0xefcdab89

Definition at line 76 of file SHA1.cpp.

◆ SEED_2

#define SEED_2   0x98badcfe

Definition at line 77 of file SHA1.cpp.

◆ SEED_3

#define SEED_3   0x10325476

Definition at line 78 of file SHA1.cpp.

◆ SEED_4

#define SEED_4   0xc3d2e1f0

Definition at line 79 of file SHA1.cpp.

◆ SHA1_K0

#define SHA1_K0   0x5a827999

Definition at line 70 of file SHA1.cpp.

◆ SHA1_K20

#define SHA1_K20   0x6ed9eba1

Definition at line 71 of file SHA1.cpp.

◆ SHA1_K40

#define SHA1_K40   0x8f1bbcdc

Definition at line 72 of file SHA1.cpp.

◆ SHA1_K60

#define SHA1_K60   0xca62c1d6

Definition at line 73 of file SHA1.cpp.

Function Documentation

◆ blk()

static uint32_t blk ( uint32_t Buf,
int  I 
)
inlinestatic

Definition at line 32 of file SHA1.cpp.

References I, and rol().

Referenced by r1(), r2(), r3(), and r4().

◆ blk0()

static uint32_t blk0 ( uint32_t Buf,
int  I 
)
inlinestatic

Definition at line 30 of file SHA1.cpp.

References I.

Referenced by r0().

◆ r0()

static void r0 ( uint32_t A,
uint32_t B,
uint32_t C,
uint32_t D,
uint32_t E,
int  I,
uint32_t Buf 
)
inlinestatic

Definition at line 39 of file SHA1.cpp.

References A, B, blk0(), llvm::CallingConv::C, D, I, and rol().

◆ r1()

static void r1 ( uint32_t A,
uint32_t B,
uint32_t C,
uint32_t D,
uint32_t E,
int  I,
uint32_t Buf 
)
inlinestatic

Definition at line 45 of file SHA1.cpp.

References A, B, blk(), llvm::CallingConv::C, D, I, and rol().

Referenced by llvm::DIExpression::fragmentCmp().

◆ r2()

static void r2 ( uint32_t A,
uint32_t B,
uint32_t C,
uint32_t D,
uint32_t E,
int  I,
uint32_t Buf 
)
inlinestatic

Definition at line 51 of file SHA1.cpp.

References A, B, blk(), llvm::CallingConv::C, D, I, and rol().

Referenced by llvm::DIExpression::fragmentCmp().

◆ r3()

static void r3 ( uint32_t A,
uint32_t B,
uint32_t C,
uint32_t D,
uint32_t E,
int  I,
uint32_t Buf 
)
inlinestatic

Definition at line 57 of file SHA1.cpp.

References A, B, blk(), llvm::CallingConv::C, D, I, and rol().

◆ r4()

static void r4 ( uint32_t A,
uint32_t B,
uint32_t C,
uint32_t D,
uint32_t E,
int  I,
uint32_t Buf 
)
inlinestatic

Definition at line 63 of file SHA1.cpp.

References A, B, blk(), llvm::CallingConv::C, D, I, and rol().

◆ rol()

static uint32_t rol ( uint32_t  Number,
int  Bits 
)
inlinestatic

Definition at line 26 of file SHA1.cpp.

References Number.

Referenced by blk(), r0(), r1(), r2(), r3(), and r4().