librsync
2.0.2
|
Go to the source code of this file.
Functions | |
static void | rs_mdfour_block (rs_mdfour_t *md, void const *p) |
static void | rs_mdfour64 (rs_mdfour_t *m, const void *p) |
Update an MD4 accumulator from a 64-byte chunk. More... | |
static void | copy4 (unsigned char *out, uint32_t const x) |
These next routines are necessary because MD4 is specified in terms of little-endian int32s, but we have a byte buffer. More... | |
void | rs_mdfour_begin (rs_mdfour_t *md) |
static void | rs_mdfour_tail (rs_mdfour_t *m) |
Handle special behaviour for processing the last block of a file when calculating its MD4 checksum. More... | |
void | rs_mdfour_update (rs_mdfour_t *md, void const *in_void, size_t n) |
Feed some data into the MD4 accumulator. More... | |
void | rs_mdfour_result (rs_mdfour_t *md, unsigned char *out) |
void | rs_mdfour (unsigned char *out, void const *in, size_t n) |
Variables | |
static unsigned char | PADDING [64] |
padding data used for finalising More... | |
MD4 message digest algorithm.
This was originally written by Andrew Tridgell for use in Samba. It was then modified by;
2002-06-xx: Robert Weber rober optimisations and fixed >512M support. t.we ber@C olor ado.e du
2002-06-27: Donovan Baarda abo@m further optimisations and cleanups. inki rri.a pana .org. au
2004-09-09: Simon Law sflla handle little-endian machines that can't do unaligned access (e.g. ia64, pa-risc). w@de bian. org
Definition in file mdfour.c.
|
static |
Update an MD4 accumulator from a 64-byte chunk.
This cannot be used for the last chunk of the file, which must be padded and contain the file length. rs_mdfour_tail() is used for that.
X | A series of integer, read little-endian from the file. |
|
inlinestatic |
These next routines are necessary because MD4 is specified in terms of little-endian int32s, but we have a byte buffer.
On little-endian platforms, I think we can just use the buffer pointer directly.
There are some nice endianness routines in glib, including assembler variants. If we ever depended on glib, then it could be good to use them instead.
|
static |
Handle special behaviour for processing the last block of a file when calculating its MD4 checksum.
This must be called exactly once per file.
Modified by Robert Weber to use uint64 in order that we can sum files > 2^29 = 512 MB. –Rober t.We ber@c olor ado.e du
void rs_mdfour_update | ( | rs_mdfour_t * | md, |
void const * | in_void, | ||
size_t | n | ||
) |
|
static |