|
PostgreSQL Source Code git master
|

Go to the source code of this file.
Macros | |
| #define | K(t) _K[(t) / 20] |
| #define | F0(b, c, d) (((b) & (c)) | ((~(b)) & (d))) |
| #define | F1(b, c, d) (((b) ^ (c)) ^ (d)) |
| #define | F2(b, c, d) (((b) & (c)) | ((b) & (d)) | ((c) & (d))) |
| #define | F3(b, c, d) (((b) ^ (c)) ^ (d)) |
| #define | S(n, x) (((x) << (n)) | ((x) >> (32 - (n)))) |
| #define | H(n) (ctx->h.b32[(n)]) |
| #define | COUNT (ctx->count) |
| #define | BCOUNT (ctx->c.b64[0] / 8) |
| #define | W(n) (ctx->m.b32[(n)]) |
| #define | PUTPAD(x) |
Functions | |
| static void | sha1_step (pg_sha1_ctx *ctx) |
| static void | sha1_pad (pg_sha1_ctx *ctx) |
| static void | sha1_result (uint8 *digest0, pg_sha1_ctx *ctx) |
| void | pg_sha1_init (pg_sha1_ctx *ctx) |
| void | pg_sha1_update (pg_sha1_ctx *ctx, const uint8 *data, size_t len) |
| void | pg_sha1_final (pg_sha1_ctx *ctx, uint8 *dest) |
Variables | |
| static const uint32 | _K [] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6} |
| void pg_sha1_final | ( | pg_sha1_ctx * | ctx, |
| uint8 * | dest | ||
| ) |
Definition at line 365 of file sha1.c.
References sha1_pad(), and sha1_result().
Referenced by pg_cryptohash_final().
| void pg_sha1_init | ( | pg_sha1_ctx * | ctx | ) |
Definition at line 316 of file sha1.c.
Referenced by pg_cryptohash_init().
| void pg_sha1_update | ( | pg_sha1_ctx * | ctx, |
| const uint8 * | data, | ||
| size_t | len | ||
| ) |
Definition at line 332 of file sha1.c.
References pg_sha1_ctx::b64, pg_sha1_ctx::b8, pg_sha1_ctx::c, COUNT, data, fb(), input, len, pg_sha1_ctx::m, and sha1_step().
Referenced by pg_cryptohash_update().
|
static |
Definition at line 233 of file sha1.c.
References pg_sha1_ctx::b8, pg_sha1_ctx::c, COUNT, fb(), pg_sha1_ctx::m, PUTPAD, and sha1_step().
Referenced by pg_sha1_final().
|
static |
Definition at line 276 of file sha1.c.
References pg_sha1_ctx::b8, fb(), and pg_sha1_ctx::h.
Referenced by pg_sha1_final().
|
static |
Definition at line 90 of file sha1.c.
References a, b, pg_sha1_ctx::b8, F0, F1, F2, F3, fb(), H, K, pg_sha1_ctx::m, S, and W.
Referenced by pg_sha1_update(), and sha1_pad().