类 Hash
java.lang.Object
org.nervos.ckb.crypto.Hash
public class Hash
extends java.lang.Object
Cryptographic hash functions.
-
字段概要
字段 修饰符和类型 字段 说明 protected static byte[]CKB_HASH_PERSONALIZATION -
方法概要
修饰符和类型 方法 说明 static java.lang.Stringblake160(java.lang.String hexInput)static byte[]blake2b(byte[] input)Blake2b-256 hash function.static byte[]blake2b(byte[] input, int offset, int length)Blake2b-256 hash function.static java.lang.Stringblake2b(java.lang.String hexInput)Blake2b-256 hash function.static java.lang.Stringblake2bString(java.lang.String utf8String)Blake2b-256 hash function that operates on a UTF-8 encoded String.
-
字段详细资料
-
CKB_HASH_PERSONALIZATION
protected static final byte[] CKB_HASH_PERSONALIZATION
-
-
方法详细资料
-
blake2b
public static java.lang.String blake2b(java.lang.String hexInput)Blake2b-256 hash function.- 参数:
hexInput- hex encoded input data with optional 0x prefix- 返回:
- hash value as hex encoded string
-
blake2b
public static byte[] blake2b(byte[] input, int offset, int length)Blake2b-256 hash function.- 参数:
input- binary encoded input dataoffset- of start of datalength- of data- 返回:
- hash value
-
blake2b
public static byte[] blake2b(byte[] input)Blake2b-256 hash function.- 参数:
input- binary encoded input data- 返回:
- hash value
-
blake2bString
public static java.lang.String blake2bString(java.lang.String utf8String)Blake2b-256 hash function that operates on a UTF-8 encoded String.- 参数:
utf8String- UTF-8 encoded string- 返回:
- hash value as hex encoded string
-
blake160
public static java.lang.String blake160(java.lang.String hexInput)
-