blob: 256ba7870860e56854aaa80c711b7cb3119082d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
Multihash
=========
Multihash is a library for hashing with multiple algorithms at the same time.
The purpose is to enable users to calculate multiple checksums as easy as a
single checksum, without unnecessary overhead.
Available algorithms:
* CRC32 (crc32)
* Ed2k (ed2k)
* MD5 (md5)
* SHA1 (sha1)
Installation
============
For manual installation; run:
./setup.py build
sudo ./setup.py install
Usage
=====
>>> import multihash
>>> c = multihash.CRC32()
>>> c.update('foo')
>>> c.digest()
'8c736521'
>>> m = multihash.Multihash('md5', 'sha1')
>>> m.update('foo')
>>> m.md5()
'acbd18db4cc2f85cedef654fccc4a4d8'
>>> m.sha1()
'0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33'
|