Package org.nervos.muta.util
Class Util
- java.lang.Object
-
- org.nervos.muta.util.Util
-
public class Util extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.security.SecureRandom
SECURE_RANDOM
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
bigIntegerToBytes32(java.math.BigInteger input)
static byte[]
generateRandom32Bytes()
static java.lang.String
generateRandom32BytesHex()
static void
isValidHex(java.lang.String input)
static byte[]
keccak256(byte[] input)
static java.lang.String
remove0x(java.lang.String input)
static java.lang.String
start0x(java.lang.String input)
-
-
-
Method Detail
-
keccak256
public static byte[] keccak256(byte[] input)
-
generateRandom32Bytes
public static byte[] generateRandom32Bytes()
-
generateRandom32BytesHex
public static java.lang.String generateRandom32BytesHex()
-
start0x
public static java.lang.String start0x(java.lang.String input)
-
remove0x
public static java.lang.String remove0x(java.lang.String input)
-
isValidHex
public static void isValidHex(java.lang.String input)
-
bigIntegerToBytes32
public static byte[] bigIntegerToBytes32(java.math.BigInteger input)
-
-