public class BinaryUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
calculateMd5(byte... bytes)
算出字节数组的md5
|
static String |
encodeMD5(byte... bytes)
算出字节数组的md5
|
static byte[] |
fromBase64String(String base64String)
将Base64字符串解码成字节数组
|
static String |
toBase64String(byte... bytes)
对字节数组进行Base64编码
|
public static String toBase64String(byte... bytes)
bytes - 待编码的字节数组public static byte[] fromBase64String(String base64String)
base64String - 待解码的Base64字符串public static byte[] calculateMd5(byte... bytes)
throws NoSuchAlgorithmException
bytes - 待计算的字节数组NoSuchAlgorithmException - 没有找到匹配的算法public static String encodeMD5(byte... bytes) throws NoSuchAlgorithmException
bytes - 待计算的字节数组NoSuchAlgorithmException - 没有找到匹配的算法Copyright © 2018. All rights reserved.