public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static long |
crc32(byte[] bytes) |
static String |
encode(Map<String,List<String>> v) |
static String |
hashSHA256(byte[] content) |
static byte[] |
hmacSHA1(byte[] key,
String content) |
static byte[] |
hmacSHA256(byte[] key,
String content) |
static List<org.apache.http.NameValuePair> |
mapToPairList(Map<String,String> params) |
static Map<String,String> |
paramsToMap(Object obj) |
static List<org.apache.http.NameValuePair> |
paramsToPair(Object obj) |
static Map<String,String> |
protoBufferToMap(com.google.protobuf.MessageOrBuilder obj,
boolean needDefaultValueFields) |
static String |
randWeights(Map<String,Integer> weightsMap,
String excludeDomain) |
public static List<org.apache.http.NameValuePair> mapToPairList(Map<String,String> params)
public static byte[] hmacSHA256(byte[] key,
String content)
throws Exception
Exceptionpublic static byte[] hmacSHA1(byte[] key,
String content)
throws Exception
ExceptionCopyright © 2021. All rights reserved.