librsync  2.3.4
Functions
mksum.c File Reference

Generate file signatures. More...

Include dependency graph for mksum.c:

Go to the source code of this file.

Functions

static rs_result rs_sig_s_header (rs_job_t *job)
 State of trying to send the signature header. More...
 
static rs_result rs_sig_s_generate (rs_job_t *job)
 State of reading a block and trying to generate its sum. More...
 
rs_job_trs_sig_begin (size_t block_len, size_t strong_len, rs_magic_number sig_magic)
 Start generating a signature. More...
 

Detailed Description

Generate file signatures.

Generating checksums is pretty easy, since we can always just process whatever data is available. When a whole block has arrived, or we've reached the end of the file, we write the checksum out.

Definition in file mksum.c.

Function Documentation

◆ rs_sig_s_header()

static rs_result rs_sig_s_header ( rs_job_t job)
static

State of trying to send the signature header.

Definition at line 45 of file mksum.c.

◆ rs_sig_s_generate()

static rs_result rs_sig_s_generate ( rs_job_t job)
static

State of reading a block and trying to generate its sum.

Definition at line 88 of file mksum.c.

◆ rs_sig_begin()

rs_job_t * rs_sig_begin ( size_t  block_len,
size_t  strong_len,
rs_magic_number  sig_magic 
)

Start generating a signature.

It's recommended you use rs_sig_args() to get the recommended arguments for this based on the original file size.

Returns
A new rs_job_t into which the old file data can be passed.
Parameters
sig_magicSignature file format to generate (0 for "recommended"). See rs_magic_number.
block_lenChecksum block size to use (0 for "recommended"). Larger values make the signature shorter, and the delta longer.
strong_lenStrongsum length in bytes to use (0 for "maximum", -1 for "minimum"). Smaller values make the signature shorter but increase the risk of corruption from hash collisions.
See also
rs_sig_file()

Definition at line 110 of file mksum.c.