{"library":"py-tlsh","title":"py-tlsh","description":"TLSH (Trend Micro Locality Sensitive Hashing) is a fuzzy hashing algorithm for similarity comparison of binary data. The py-tlsh package provides a C++ Python extension for computing and comparing TLSH hashes. Current version 4.12.1 (but a major v5.0.0 exists; see warnings). Release cadence is irregular.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install py-tlsh"],"cli":null},"imports":["import tlsh"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import tlsh\n\n# Create a TLSH hash from a byte string\ndata = b\"hello world\"\nhash = tlsh.hash(data)\nprint(\"Hash:\", hash)\n\n# Compare two hashes (similarity score)\nhash2 = tlsh.hash(b\"hello world!\")\nscore = tlsh.diff(hash, hash2)\nprint(\"Difference score:\", score)\n\n# Check if a hash is valid\nprint(\"Is valid:\", tlsh.is_valid(hash))","lang":"python","description":"Basic usage: hash creation, comparison, and validation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}