Skip to content

myibu/algorithm-java

Repository files navigation

Algorithm-Java

General algorighm implements in java

Implements

IDCardChecker

Reference to: ChineseIdCardValidate.pdf

SipHash

Reference to: siphash.pdf

SHA256

Reference to: SHA256.pdf

MurmurHash2

Reference to: MurmurHash2.c

BloomFilter

Reference to: BloomFilter.pdf

Bits

method remark
inverse ~
and &
or `
xor ^
lShift <<
rShift >>
rrShift >>>

LinearCongruentialRandom

Reference to: LinearCongruence.pdf

MersenneTwisterRandom

Reference to: MersenneTwister.pdf

DFASensitiveWordFilter

AhoCorasickSensitiveWordFilter

LZ77Compressor

Reference to: LZ77.pdf

LZWCompressor

Reference to: LZW.pdf

LZFCompressor

Reference to: lzf_c.c lzf_d.c

GolombEncoder

Reference to: HoffmanAndGolombCoding.pdf

Installation

<dependency>
  <groupId>com.github.myibu</groupId>
  <artifactId>algorithm-java</artifactId>
  <version>1.0.5</version>
</dependency>

Examples

SHA256 sha256 = new SHA256();
byte[] bs = sha256.encode("abc".getBytes("utf-8"));

Change Notes

1.0.5

Add more useful methods in Bits