Ruby
2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)
|
Go to the source code of this file.
Data Structures | |
union | CHAR64LONG16 |
Macros | |
#define | SHA1HANDSOFF /* Copies data before messing with it. */ |
#define | _DIAGASSERT(cond) assert(cond) |
#define | rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) |
#define | blk0(i) |
#define | blk(i) |
#define | R0(v, w, x, y, z, i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); |
#define | R1(v, w, x, y, z, i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); |
#define | R2(v, w, x, y, z, i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); |
#define | R3(v, w, x, y, z, i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); |
#define | R4(v, w, x, y, z, i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); |
Functions | |
void | SHA1_Transform (uint32_t state[5], const uint8_t buffer[64]) |
int | SHA1_Init (SHA1_CTX *context) |
void | SHA1_Update (SHA1_CTX *context, const uint8_t *data, size_t len) |
int | SHA1_Finish (SHA1_CTX *context, uint8_t digest[20]) |
#define blk | ( | i | ) |
#define blk0 | ( | i | ) |
#define rol | ( | value, | |
bits | |||
) | (((value) << (bits)) | ((value) >> (32 - (bits)))) |
#define SHA1HANDSOFF /* Copies data before messing with it. */ |
Definition at line 248 of file sha1.c.
References _DIAGASSERT, SHA1_CTX::count, i, SHA1_Update(), and SHA1_CTX::state.
Definition at line 202 of file sha1.c.
References _DIAGASSERT, SHA1_CTX::count, and SHA1_CTX::state.
Definition at line 221 of file sha1.c.
References _DIAGASSERT, SHA1_CTX::buffer, SHA1_CTX::count, i, len, memcpy(), SHA1_Transform(), SHA1_CTX::state, and void.
Referenced by SHA1_Finish().