Author: Marc 'BlackJack' Rintsch
Description: Manual for the summer.py script.
Keywords: checksum, md5, sha1, Python
Date: 2005-02-27 12:46:17 +0100 (Sun, 27 Feb 2005)

# summer.py Manual

## A checksum script

Author: | Marc 'BlackJack' Rintsch
Contact: | marc@rintsch.de
Date: | 2005-02-27 12:46:17 +0100 (Sun, 27 Feb 2005)
Version: | 0.0.1
Revision: | 642
Copyright: | This document has been placed in the public domain.

Contents

# 1 Name

summer.py -- calculates checksums of files.

# 2 Synopsis

    summer.py [path ...]

If `-` or no path is given at the command line the input is read from stdin.

# 3 Description

The program calculates checksums of the given file(s). It uses the md5 and the sha1 algorithms and produces output compatible with the commands `md5sum` and `sha1sum`. Those tools can be used to test the files against the checksums later.

The reason to use `summer.py` instead of the two programs mentioned above is that this program calculates both checksums in one pass, i.e. the data is just read once. This makes a noticable difference in execution time, especially on large files like movies, CD or DVD images.

# 4 Requirements

The script requires Python version 2.3 or higher.

# 5 Examples

Calculate the md5 and sha1 checksum of an ISO image and store them into a file:

    ./summer.py image.iso > checksums.txt

# 6 Output Format

The output format is the same as the one of the standard `md5sum` and `sha1sum` programs. It is a text file with one line per checksum with the checksum as hexdigest, followed by a single space, followed by another space if the file was opened as text file or a `*` if it was opened in binary mode, followed by the filename.

Example of checksums for a file that was opened in text mode:

    c83e90b70123138ec8de3528eb1aa5ba  image.iso
    bc7c898b034bec1de8cf8fc76185e2432ac360eb  image.iso

# 7 History

0.0.1a : 2005-02-27
  Initial alpha release.

# 8 ToDo

- Add hash algorithms of the Python Cryptography Toolkit if available.
- Option to test checksums instead of just generating them.

# 9 Bugs

None known yet. If you find some please send me a mail.

# 10 Copyright

Copyright © 2005 Marc 'BlackJack' Rintsch <marc@rintsch.de>

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.