https://github.com/tdebatty/java-spamsum
A Java implementation of SpamSum / SSDeep
https://github.com/tdebatty/java-spamsum
Last synced: 9 months ago
JSON representation
A Java implementation of SpamSum / SSDeep
- Host: GitHub
- URL: https://github.com/tdebatty/java-spamsum
- Owner: tdebatty
- License: other
- Created: 2014-07-19T18:33:05.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-09T10:25:01.000Z (about 9 years ago)
- Last Synced: 2023-08-02T15:12:14.874Z (over 2 years ago)
- Language: Java
- Size: 35.2 KB
- Stars: 14
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
#java-spamsum
A Java implementation of SpamSum, also known as SSDeep or Context Triggered Piecewise Hashing (CTPH), based on the original [SpamSum program by Andrew Tridgell](http://www.samba.org/ftp/unpacked/junkcode/spamsum/).
## Download
Using maven:
```
info.debatty
java-spamsum
RELEASE
```
See the [releases](https://github.com/tdebatty/java-spamsum/releases) page.
## Usage
```java
import info.debatty.java.spamsum.*;
public class MyApp {
public static void main (String[] args) {
String s1 = "This is a string that might be a spam... Depends on the "
+ "hash, if it looks like a known hash...\n";
String s2 = "Play to win Download Casino King Spin now\n";
SpamSum s = new SpamSum();
// 3:hMCEqNE0M+YFFWV5wdgHMyA8FNzs1b:hujkYFFWV51HM8Lzs1b
System.out.println(s.hashString(s1));
// 3:Y0ujLEEz6KxMENJv:Y0u3tz68/v
System.out.println(s.hashString(s2));
}
}
```