summaryrefslogtreecommitdiff
path: root/fuzzy.c
AgeCommit message (Collapse)Author
2014-09-09fix output for ugly corner caseHEADmasterHelmut Grohne
When the roll_sum of the last piece happens to be 0, the original algorithm picks one byte of the digest behind the end. In the original algorithm, it is initially set to zero and updated unconditionally even when the length is not increased. Copy that behaviour.
2013-03-25implement variants of the hashesHelmut Grohne
FUZZY_FLAG_ELIMSEQ: The comparison operation runs eliminate_sequence before actually comparing two hashes on both of them. This step can be moved to hash generation time using this flag. Suggested by Niels Thykier. FUZZY_FLAG_NOTRUNC: The second part of the hash is truncated to SPAMSUM_LENGTH/2 by default. When comparing two hashes with different blocksize this can result in a larger edit distance and therefore false negatives.
2013-03-25solve a splint warningHelmut Grohne
2013-03-24properly set errnoHelmut Grohne
2013-03-24do not fail digest computation that oftenHelmut Grohne
2013-03-24rename functions and export themHelmut Grohne
Use fuzzy_ as a prefix like all of the previous ones. Export fuzzy_new, fuzzy_update, fuzzy_digest and fuzzy_free. These functions are sufficient to put the caller in control and build an API similar to Python's hashlib.
2013-03-24fix comment for array implementationHelmut Grohne
2013-03-24update total_size as early as possibleHelmut Grohne
This improves the success rate of ssdeep_try_reduce_blockhash and thereby gives a significant speedup.
2013-03-24turn linked list of blockhashes into an arrayHelmut Grohne
* less memory management, everything we need fit in 2.5kb * less scattering of data * less code
2013-03-24fail gracefully on large inputsHelmut Grohne
2013-03-24allow ssdeep_digest to failHelmut Grohne
This is more correct with respect to the sprintf usage and allows for future extension.
2013-03-24place ssdeep_context on the heapHelmut Grohne
When publishing an API based on ssdeep_context this enables us to change its size without breaking API or ABI. Also splint appears to cope better with that.
2013-03-24moved main function to ssdeep.cHelmut Grohne
2013-03-24ship a fuzzy.h compatible with ssdeep's fuzzy.hHelmut Grohne
2013-03-24support stdin mode like original ssdeepHelmut Grohne
2013-03-24teach splint about f{seek,tell}oHelmut Grohne
2013-03-24split ssdeep_engine_step to smaller functionsHelmut Grohne
2013-03-24use fuzzy_hash_stream where applicableHelmut Grohne
Thanks: Niels Thykier
2013-03-24initial checkingHelmut Grohne
This is a rewrite of ssdeep's fuzzy.c to do streaming hashes. It is a bit slower, but the memory consumption is bounded in all cases.