public class Hash extends Object
| Constructor and Description |
|---|
Hash() |
| Modifier and Type | Method and Description |
|---|---|
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 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)
Copyright © 2022 IoTeX Group. All rights reserved.