| Home | Trees | Indices | Help |
|
|---|
|
|
Processing of implementation manifests.
A manifest is a string representing a directory tree, with the property that two trees will generate identical manifest strings if and only if:
The manifest is typically processed with a secure hash itself. So, the idea is that any significant change to the contents of the tree will change the secure hash value of the manifest.
A top-level ".manifest" file is ignored.
| Classes | |
|
Algorithm Abstract base class for algorithms. |
|
| OldSHA1 | |
| HashLibAlgorithm | |
| Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| Variables | |
hashlib = NoneCreate a new digest. |
|
algorithms = {'sha1': OldSHA1(), 'sha1new': HashLibAlgorithm('
|
|
| Function Details |
Look-up an Algorithm by name.
|
Deprecated: use get_algorithm and Algorithm.generate_manifest instead. |
Writes a .manifest file into 'dir', and returns the digest. You should call fixup_permissions before this to ensure that the permissions are correct. On exit, dir itself has mode 555. Subdirectories are not changed.
|
Take an ID in the form 'alg=value' and return a tuple (alg, value), where 'alg' is an instance of Algorithm and 'value' is a string.
|
Copy path src to dest, checking that the contents give the right digest. dest must not exist. New file is created with a mode of 'mode & umask'. |
Ensure that directory 'dir' generates the given digest. For a non-error return:
|
Copy directory source to be a subdirectory of target if it matches the required_digest. manifest_data is normally source/.manifest. source and manifest_data are not trusted (will typically be under the control of another user). The copy is first done to a temporary directory in target, then renamed to the final name only if correct. Therefore, an invalid 'target/required_digest' will never exist. A successful return means than target/required_digest now exists (whether we created it or not). |
Set permissions recursively for children of root:
|
| Variables Details |
algorithms
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Jun 21 21:21:15 2008 | http://epydoc.sourceforge.net |