public class Hash extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
blake2b256(byte[] input)
Blake2-256 hash function.
|
static byte[] |
hash(byte[] input,
String algorithm)
Generates a digest for the given
input. |
static byte[] |
hmacSha512(byte[] key,
byte[] input) |
static byte[] |
sha256(byte[] input)
Generates SHA-256 digest for the given
input. |
static byte[] |
sha256hash160(byte[] input) |
static byte[] |
sha3(byte[] input)
Keccak-256 hash function.
|
static byte[] |
sha3(byte[] input,
int offset,
int length)
Keccak-256 hash function.
|
static String |
sha3(String hexInput)
Keccak-256 hash function.
|
static String |
sha3String(String utf8String)
Keccak-256 hash function that operates on a UTF-8 encoded String.
|
public static byte[] hash(byte[] input,
String algorithm)
input.input - The input to digestalgorithm - The hash algorithm to useRuntimeException - If we couldn't find any provider for the given algorithmpublic static String sha3(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 String sha3String(String utf8String)
utf8String - UTF-8 encoded stringpublic static byte[] sha256(byte[] input)
input.input - The input to digestRuntimeException - If we couldn't find any SHA-256 providerpublic static byte[] hmacSha512(byte[] key,
byte[] input)
public static byte[] sha256hash160(byte[] input)
public static byte[] blake2b256(byte[] input)
input - binary encoded input dataCopyright © 2021. All rights reserved.