mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-03-26 18:23:36 -04:00
The main purpose of the SHA checksums are to allow the daemon auth code to pick a stonger digest method when negotiating the auth digest to use. However, the SHA digests are also available for use in file checksums, should someon really want to use one of them. The new digests are listed from strongest to weakest at the start of the daemon auth list, giving them the highest priority. The new digests are listed from weakest to strongest near the end of the checksum list, giving them the lowest priority of use for file checksums.
23 lines
687 B
C
23 lines
687 B
C
/* The include file for both the MD4 and MD5 routines. */
|
|
|
|
#ifdef USE_OPENSSL
|
|
#include <openssl/sha.h>
|
|
#include <openssl/evp.h>
|
|
#endif
|
|
#include "md-defines.h"
|
|
|
|
typedef struct {
|
|
uint32 A, B, C, D;
|
|
uint32 totalN; /* bit count, lower 32 bits */
|
|
uint32 totalN2; /* bit count, upper 32 bits */
|
|
uchar buffer[CSUM_CHUNK];
|
|
} md_context;
|
|
|
|
void mdfour_begin(md_context *md);
|
|
void mdfour_update(md_context *md, const uchar *in, uint32 length);
|
|
void mdfour_result(md_context *md, uchar digest[MD4_DIGEST_LEN]);
|
|
|
|
void md5_begin(md_context *ctx);
|
|
void md5_update(md_context *ctx, const uchar *input, uint32 length);
|
|
void md5_result(md_context *ctx, uchar digest[MD5_DIGEST_LEN]);
|