Modifier and Type | Field and Description |
---|---|
static String |
HASH_ALGORITHM_MD5
Specifies usage of the MD5 algorithm in
hash(String, InputStream) . |
static String |
HASH_ALGORITHM_SHA
Specifies usage of the SHA algorithm in
hash(String, InputStream) . |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decodeHexStr(String hex)
Decode a string containing two hex digits for each byte.
|
static String |
encodeHexStr(byte[] buf) |
static String |
encodeHexStr(byte[] buf,
int pos,
int len)
Encode a byte array into a human readable hex string.
|
static String |
formatEncodedHexStrForHuman(String hex) |
static byte[] |
hash(String algorithm,
InputStream in) |
static byte[] |
hash(String algorithm,
InputStream in,
ProgressMonitor monitor) |
static String |
sha1(byte[] in) |
static String |
sha1(InputStream in) |
static String |
sha1(String in) |
static String |
sha1ForHuman(byte[] in) |
static String |
sha1ForHuman(InputStream in) |
public static final String HASH_ALGORITHM_MD5
hash(String, InputStream)
.public static final String HASH_ALGORITHM_SHA
hash(String, InputStream)
.public static String encodeHexStr(byte[] buf)
public static String encodeHexStr(byte[] buf, int pos, int len)
buf
- The byte array to translate into human readable text.pos
- The start position (0-based).len
- The number of bytes that shall be processed beginning at the position specified by pos
.encodeHexStr(byte[])
,
decodeHexStr(String)
public static byte[] decodeHexStr(String hex)
hex
- The hex encoded stringencodeHexStr(byte[])
,
encodeHexStr(byte[], int, int)
public static byte[] hash(String algorithm, InputStream in) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmException
IOException
public static byte[] hash(String algorithm, InputStream in, ProgressMonitor monitor) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmException
IOException
public static String formatEncodedHexStrForHuman(String hex)
public static String sha1ForHuman(byte[] in)
public static String sha1ForHuman(InputStream in) throws IOException
IOException
public static String sha1(InputStream in) throws IOException
IOException
Copyright © 2013-2014. All Rights Reserved.