Python wrapper for ssdeep fuzzy hashing library
Shell C++ C Makefile Python Other M4
Failed to load latest commit information.
docs doc - Add install instruction for Ubuntu 16.04 Nov 13, 2016
pkgs/arch pkg/arch - Update PKGBUILD files Aug 7, 2014
ssdeep src - Bump version 3.1.1 to 3.2 Nov 27, 2016
tests test - Additional tests for PseudoHash() class Nov 8, 2014
.gitignore git - Ignore idea and docs/build dir Nov 27, 2016
LICENSE doc - Update LICENSE Jun 11, 2014
README.rst doc - Fix issue with badge image target Nov 13, 2016 build - Add Python 3.5 to classifiers Nov 11, 2016


ssdeep Python Wrapper

This is a straightforward Python wrapper for ssdeep by Jesse Kornblum, which is a library for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies. Such inputs have sequences of identical bytes in the same order, although bytes in between these sequences may be different in both content and length.

Latest Version License Python Versions Latest Docs Build state

How to use it

To compute a fuzzy hash, use hash function:

>>> import ssdeep
>>> hash1 = ssdeep.hash('Also called fuzzy hashes, Ctph can match inputs that have homologies.')
>>> hash1
>>> hash2 = ssdeep.hash('Also called fuzzy hashes, CTPH can match inputs that have homologies.')
>>> hash2

The compare function returns the match between 2 hashes, an integer value from 0 (no match) to 100.

>>>, hash2)

More examples are available in the python-ssdeep documentation.


If all requirements are met it is possible to install the wrapper by using pip or easy_install.

$ pip install ssdeep

The build will fail if the ssdeep library isn't installed. To use the included version of the ssdeep library use the following command.

$ BUILD_LIB=1 pip install ssdeep

For more information have a look at the python-ssdeep documentation.

Tested on ...

  • CentOS 7
  • Debian 8
  • Ubuntu 14.04, 16.04


The code is licensed under the terms of the LGPLv3+.

This wrapper includes the unchanged source distribution of ssdeep version 2.13. It is licensed under the GPLv2.