pub fn signature_with_options<R, W>(
    input: &mut R,
    output: &mut W,
    block_len: usize,
    strong_len: usize,
    sig_type: SignatureType
) -> Result<u64>where
    R: BufRead + ?Sized,
    W: Write + ?Sized,
Expand description

Generates the signature of a basis input, and writes it out to an output stream.

This function will consume the given input stream and attempt to write the resulting signature to the given output. In case of success, the number of bytes written is returned, otherwise an error is reported.

The accepted arguments, among the input and output streams, are:

  • block_len: the block size for signature generation, in bytes;
  • strong_len: the truncated length of strong checksums, in bytes;
  • sig_type: the signature format to be used.