public class Digest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
Digest.filechunk |
private static class |
Digest.md5FilechunkConsumer |
Modifier and Type | Field and Description |
---|---|
static java.util.Queue<java.security.MessageDigest> |
digestPool |
private static ARC<java.lang.String,byte[]> |
md5Cache |
private static int |
md5CacheSize |
Constructor and Description |
---|
Digest() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanup()
clean the md5 cache
|
static byte[] |
decodeHex(java.lang.String hex) |
static java.lang.String |
encodeHex(byte[] in) |
static java.lang.String |
encodeHex(long in,
int length) |
static java.lang.String |
encodeMD5Hex(byte[] b) |
static java.lang.String |
encodeMD5Hex(java.io.File file) |
static java.lang.String |
encodeMD5Hex(java.lang.String key) |
private static byte[] |
encodeMD5Raw(byte[] b) |
static byte[] |
encodeMD5Raw(java.io.File file) |
static byte[] |
encodeMD5Raw(java.lang.String key) |
static java.lang.String |
encodeOctal(byte[] in) |
static java.lang.String |
fastFingerprintB64(java.io.File file,
boolean includeDate) |
static java.lang.String |
fastFingerprintHex(java.io.File file,
boolean includeDate) |
static byte[] |
fastFingerprintRaw(java.io.File file,
boolean includeDate)
the fast fingerprint computes a md5-like hash from a given file,
which is different from a md5 because it does not read the complete file
but reads only the first and last megabyte of it.
|
static void |
main(java.lang.String[] s) |
public static java.util.Queue<java.security.MessageDigest> digestPool
private static final int md5CacheSize
private static ARC<java.lang.String,byte[]> md5Cache
public static void cleanup()
public static java.lang.String encodeHex(long in, int length)
public static java.lang.String encodeOctal(byte[] in)
public static java.lang.String encodeHex(byte[] in)
public static byte[] decodeHex(java.lang.String hex)
public static java.lang.String encodeMD5Hex(java.lang.String key)
public static java.lang.String encodeMD5Hex(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.lang.String encodeMD5Hex(byte[] b)
public static byte[] encodeMD5Raw(java.lang.String key)
public static byte[] encodeMD5Raw(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.lang.String fastFingerprintHex(java.io.File file, boolean includeDate)
public static java.lang.String fastFingerprintB64(java.io.File file, boolean includeDate)
public static byte[] fastFingerprintRaw(java.io.File file, boolean includeDate) throws java.io.IOException
file
- java.io.IOException
private static byte[] encodeMD5Raw(byte[] b)
public static void main(java.lang.String[] s)