user17451
user17451

Reputation: 665

I need to write code in python for comparing text of two documents using fingerprint techniques

I need to write code in python language for comparing the text of document using fingerprint techniques. I do not know to take fingerprint of a document or to generate fingerprint of a document. I'm asking if anyone knows the method or has source code for generating fingerprints of documents which is stored in bits form.

Upvotes: 3

Views: 1866

Answers (2)

Cristian Ciupitu
Cristian Ciupitu

Reputation: 20910

If you want message digests (cryptographic hashes), use the hashlib library. Here's an example (IPython session):

 In [1]: import hashlib

 In [2]: md = hashlib.sha256(open('/tmp/Calendar.xls', 'rb').read())

 In [3]: md.hexdigest()
 Out[3]: '8517f1eae176f1a20de78d879f81f23de503cfd6b8e4be1d798fb2342934b187'

Upvotes: 4

Hank Gay
Hank Gay

Reputation: 71979

You might try the following papers to get started with the concept of fingerprinting:

Upvotes: 4

Related Questions