LLVM  6.0.0svn
Macros | Functions
SHA1.cpp File Reference
#include "llvm/Support/SHA1.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/Host.h"
#include <stdint.h>
#include <string.h>
Include dependency graph for SHA1.cpp:

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 79 of file SHA1.cpp.

Referenced by llvm::SHA1::init().

◆ SEED_1

#define SEED_1   0xefcdab89

Definition at line 80 of file SHA1.cpp.

Referenced by llvm::SHA1::init().

◆ SEED_2

#define SEED_2   0x98badcfe

Definition at line 81 of file SHA1.cpp.

Referenced by llvm::SHA1::init().

◆ SEED_3

#define SEED_3   0x10325476

Definition at line 82 of file SHA1.cpp.

Referenced by llvm::SHA1::init().

◆ SEED_4

#define SEED_4   0xc3d2e1f0

Definition at line 83 of file SHA1.cpp.

Referenced by llvm::SHA1::init().

◆ SHA1_K0

#define SHA1_K0   0x5a827999

Definition at line 74 of file SHA1.cpp.

◆ SHA1_K20

#define SHA1_K20   0x6ed9eba1

Definition at line 75 of file SHA1.cpp.

◆ SHA1_K40

#define SHA1_K40   0x8f1bbcdc

Definition at line 76 of file SHA1.cpp.

◆ SHA1_K60

#define SHA1_K60   0xca62c1d6

Definition at line 77 of file SHA1.cpp.

Function Documentation

◆ blk()

static uint32_t blk ( uint32_t Buf,
int  I 
)
static

Definition at line 36 of file SHA1.cpp.

References rol().

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

◆ blk0()

static uint32_t blk0 ( uint32_t Buf,
int  I 
)
static

Definition at line 34 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 
)
static

Definition at line 43 of file SHA1.cpp.

References blk0(), D, and rol().

Referenced by getFPTernOp(), and llvm::SHA1::init().

◆ r1()

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

◆ r2()

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

◆ r3()

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

Definition at line 61 of file SHA1.cpp.

References blk(), C, and rol().

Referenced by getFPTernOp(), and llvm::SHA1::init().

◆ r4()

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

Definition at line 67 of file SHA1.cpp.

References blk(), D, and rol().

Referenced by llvm::SHA1::init().

◆ rol()

static uint32_t rol ( uint32_t  Number,
int  Bits 
)
static

Definition at line 30 of file SHA1.cpp.

References llvm::tgtok::Bits.

Referenced by blk(), llvm::BitTracker::RegisterCell::operator[](), r0(), r1(), r2(), r3(), and r4().