Local implementation of the SHA1 hashing scheme.
More...
#include <freeradius-devel/util/sha1.h>
Go to the source code of this file.
|
#define | blk(i) |
|
#define | blk0(i) (block->l[i] = htonl(block->l[i])) |
|
#define | R0(v, w, x, y, z, i) do { z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); } while (0) |
|
#define | R1(v, w, x, y, z, i) do { z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); } while (0) |
|
#define | R2(v, w, x, y, z, i) do { z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); } while (0) |
|
#define | R3(v, w, x, y, z, i) do { z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); } while (0) |
|
#define | R4(v, w, x, y, z, i) do { z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); } while (0) |
|
#define | rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) |
|
Local implementation of the SHA1 hashing scheme.
SHA-1 in C 100% Public Domain
- Author
- Steve Reid (steve.nosp@m.@edm.nosp@m.web.c.nosp@m.om)
Definition in file sha1.c.
◆ blk
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))
Definition at line 22 of file sha1.c.
◆ blk0
#define blk0 |
( |
|
i | ) |
(block->l[i] = htonl(block->l[i])) |
◆ R0
◆ R1
◆ R2
◆ R3
◆ R4
◆ rol
◆ fr_sha1_final()
◆ fr_sha1_final_no_len()
void fr_sha1_final_no_len |
( |
uint8_t |
digest[static SHA1_DIGEST_LENGTH], |
|
|
fr_sha1_ctx * |
context |
|
) |
| |
◆ fr_sha1_init()
◆ fr_sha1_transform()
void fr_sha1_transform |
( |
uint32_t |
state[static 5], |
|
|
uint8_t const |
buffer[static 64] |
|
) |
| |
◆ fr_sha1_update()