public class Hash extends Object
| 构造器和说明 |
|---|
Hash() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
doubleSha256(byte[] msg)
2次SHA256
|
static byte[] |
doubleSha256(byte[] msg,
int offset,
int length) |
static byte[] |
hashUsingSha256(byte[] msg)
1次SHA256
|
static MessageDigest |
newDigest(String algorithm) |
static byte[] |
ripeMD160(byte[] msg)
ripeMD160,这种hash算法可以缩短长度
|
public static MessageDigest newDigest(String algorithm)
public static byte[] hashUsingSha256(byte[] msg)
msg - 加密信息public static byte[] doubleSha256(byte[] msg)
msg - 加密信息public static byte[] doubleSha256(byte[] msg,
int offset,
int length)
msg - offset - length - public static byte[] ripeMD160(byte[] msg)
msg - 加密信息Copyright © 2022. All rights reserved.