Module: Ssdeep
- Defined in:
- ext/ssdeep_native/ssdeep_native.c
Defined Under Namespace
Classes: HashError
Constant Summary
- FUZZY_MAX_RESULT =
INT2NUM(FUZZY_MAX_RESULT)
- SPAMSUM_LENGTH =
INT2NUM(SPAMSUM_LENGTH)
Class Method Summary (collapse)
-
+ (Object) compare(sig1, sig2)
Compare two hashes.
-
+ (Object) from_file(filename)
Create a fuzzy hash from a file.
-
+ (Object) from_fileno(fileno)
Create a fuzzy hash from a file descriptor fileno.
-
+ (Object) from_string(buf)
Create a fuzzy hash from a ruby string.
Class Method Details
+ (Object) compare(sig1, sig2)
Compare two hashes
|
|
# File 'ext/ssdeep_native/ssdeep_native.c'
/* call-seq: compare(sig1, sig2)
*
* Compare two hashes
*
* @param String sig1 A fuzzy hash which will be compared to sig2
*
* @param String sig2 A fuzzy hash which will be compared to sig1
*
* @return Integer
* A value between 0 and 100 indicating the percentage of similarity.
*/
VALUE ssdeep_compare(VALUE klass, VALUE sig1, VALUE sig2)
|
+ (Object) from_file(filename)
Create a fuzzy hash from a file
|
|
# File 'ext/ssdeep_native/ssdeep_native.c'
/* call-seq: from_file(filename)
*
* Create a fuzzy hash from a file
*
* @param String fielname The file to read and hash
*
* @return String The fuzzy hash of the file input
*
* @raise HashError
* An exception is raised if the libfuzzy library encounters an error.
*/
VALUE ssdeep_from_filename(VALUE klass, VALUE filename)
|
+ (Object) from_fileno(fileno)
Create a fuzzy hash from a file descriptor fileno
|
|
# File 'ext/ssdeep_native/ssdeep_native.c'
/* call-seq: from_fileno(fileno)
*
* Create a fuzzy hash from a file descriptor fileno
*
* @param Integer fileno The file descriptor to read and hash
*
* @return String The fuzzy hash of the file descriptor input
*
* @raise HashError
* An exception is raised if the libfuzzy library encounters an error.
*/
VALUE ssdeep_from_fileno(VALUE klass, VALUE fileno)
|
+ (Object) from_string(buf)
Create a fuzzy hash from a ruby string
|
|
# File 'ext/ssdeep_native/ssdeep_native.c'
/* call-seq: from_string(buf)
*
* Create a fuzzy hash from a ruby string
*
* @param String buf The string to hash
*
* @return String The fuzzy hash of the string
*
* @raise HashError
* An exception is raised if the libfuzzy library encounters an error.
*/
VALUE ssdeep_from_string(VALUE klass, VALUE buf)
|