public class HashUtil
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static byte[] |
EMPTY_DATA_HASH |
static byte[] |
EMPTY_LIST_HASH |
static byte[] |
EMPTY_TRIE_HASH |
| 构造器和说明 |
|---|
HashUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
calcNewAddr(byte[] addr,
byte[] nonce)
The way to calculate new address
|
static byte[] |
doubleDigest(byte[] input) |
static byte[] |
doubleDigest(byte[] input,
int offset,
int length)
Calculates the SHA-256 hash of the given byte range, and then hashes the resulting hash again.
|
static byte[] |
randomHash() |
static byte[] |
randomPeerId() |
static byte[] |
ripemd160(byte[] data) |
static byte[] |
sha256(byte[] input) |
static byte[] |
sha3(byte[] input) |
static byte[] |
sha3(byte[] input1,
byte[] input2) |
static byte[] |
sha3(byte[] input,
int start,
int length)
hashing chunk of the data
|
static byte[] |
sha3omit12(byte[] input)
Calculates RIGTMOST160(SHA3(input)).
|
static byte[] |
sha512(byte[] input) |
static java.lang.String |
shortHash(byte[] hash) |
public static final byte[] EMPTY_DATA_HASH
public static final byte[] EMPTY_LIST_HASH
public static final byte[] EMPTY_TRIE_HASH
public static byte[] sha256(byte[] input)
input - - data for hashingpublic static byte[] sha3(byte[] input)
public static byte[] sha3(byte[] input1,
byte[] input2)
public static byte[] sha3(byte[] input,
int start,
int length)
input - - data for hashstart - - start of hashing chunklength - - length of hashing chunkpublic static byte[] sha512(byte[] input)
public static byte[] ripemd160(byte[] data)
data - - message to hashpublic static byte[] sha3omit12(byte[] input)
input - - datapublic static byte[] calcNewAddr(byte[] addr,
byte[] nonce)
addr - - creating addresnonce - - nonce of creating addresspublic static byte[] doubleDigest(byte[] input)
input - -doubleDigest(byte[], int, int)public static byte[] doubleDigest(byte[] input,
int offset,
int length)
input - -offset - -length - -public static byte[] randomPeerId()
public static byte[] randomHash()
public static java.lang.String shortHash(byte[] hash)
Copyright © 2018. All Rights Reserved.