public class Hash
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
base58CheckDecode(java.lang.String input) |
static java.lang.String |
base58CheckEncode(byte[] data) |
static byte[] |
ripemd160(byte[] input)
Generates RipeMD-160 digest for the given
input. |
static java.lang.String |
ripemd160(java.lang.String hexInput)
RipeMD-160 hash function.
|
static byte[] |
sha256(byte[] input)
Generates SHA-256 digest for the given
input. |
static byte[] |
sha256(byte[] input,
int offset,
int length) |
static byte[] |
sha256AndThenRipemd160(byte[] input)
Performs a SHA256 followed by a RIPEMD160.
|
static byte[] |
sha3(byte[] input)
Keccak-256 hash function.
|
static byte[] |
sha3(byte[] input,
int offset,
int length)
Keccak-256 hash function.
|
static java.lang.String |
sha3(java.lang.String hexInput)
Keccak-256 hash function.
|
static java.lang.String |
sha3String(java.lang.String utf8String)
Keccak-256 hash function that operates on a UTF-8 encoded String.
|
public static byte[] sha256AndThenRipemd160(byte[] input)
input - byte array with the input to be hashedpublic static java.lang.String ripemd160(java.lang.String hexInput)
hexInput - hex encoded input data with optional 0x prefixpublic static byte[] ripemd160(byte[] input)
input.input - The input to digestjava.lang.RuntimeException - If we couldn't find any RipeMD160 providerpublic static java.lang.String sha3(java.lang.String hexInput)
hexInput - hex encoded input data with optional 0x prefixpublic static byte[] sha3(byte[] input,
int offset,
int length)
input - binary encoded input dataoffset - of start of datalength - of datapublic static byte[] sha3(byte[] input)
input - binary encoded input datapublic static java.lang.String sha3String(java.lang.String utf8String)
utf8String - UTF-8 encoded stringpublic static byte[] sha256(byte[] input)
input.input - The input to digestjava.lang.RuntimeException - If we couldn't find any SHA-256 providerpublic static byte[] sha256(byte[] input,
int offset,
int length)
public static java.lang.String base58CheckEncode(byte[] data)
public static byte[] base58CheckDecode(java.lang.String input)