public class DigestUtils
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
DigestUtils.COSMd5AndReadData |
构造器和说明 |
---|
DigestUtils() |
限定符和类型 | 方法和说明 |
---|---|
static java.lang.String |
getBase64(java.lang.String content) |
static long |
getBigIntFromString(java.lang.String value) |
static java.lang.String |
getBigIntToString(long l) |
static java.lang.String |
getCOSMd5(java.io.InputStream inputStream,
long skip,
long size) |
static DigestUtils.COSMd5AndReadData |
getCOSMd5AndReadData(java.io.InputStream inputStream,
int size) |
static long |
getCRC64(java.io.InputStream inputStream) |
static long |
getCRC64(java.io.InputStream inputStream,
long skip,
long size) |
static java.lang.String |
getCRC64String(java.io.File file) |
static java.lang.String |
getCRC64String(java.io.InputStream inputStream) |
static java.lang.String |
getHmacSha1(java.lang.String content,
java.lang.String key) |
static java.lang.String |
getMD5(java.lang.String filePath) |
static java.lang.String |
getSecurityBase64(java.lang.String content)
获取URL安全的base64编码字符串
1、将普通 BASE64 编码结果中的加号(+)替换成连接号(-) 2、将编码结果中的正斜线(/)替换成下划线(_) 3、保留编码结果中末尾的全部等号(=) |
static java.lang.String |
getSha1(java.lang.String content) |
static java.lang.String |
getSHA1FromBytes(byte[] data,
int offset,
int len) |
static java.lang.String |
getSHA1FromPath(java.lang.String filePath) |
public static java.lang.String getMD5(java.lang.String filePath) throws CosXmlClientException
public static long getBigIntFromString(java.lang.String value)
public static java.lang.String getBigIntToString(long l)
public static java.lang.String getCRC64String(java.io.InputStream inputStream)
public static java.lang.String getCRC64String(java.io.File file)
public static long getCRC64(java.io.InputStream inputStream)
public static long getCRC64(java.io.InputStream inputStream, long skip, long size)
@Nullable public static java.lang.String getCOSMd5(java.io.InputStream inputStream, long skip, long size) throws java.io.IOException
java.io.IOException
public static DigestUtils.COSMd5AndReadData getCOSMd5AndReadData(java.io.InputStream inputStream, int size) throws java.io.IOException
java.io.IOException
public static java.lang.String getSha1(java.lang.String content) throws CosXmlClientException
public static java.lang.String getSHA1FromPath(java.lang.String filePath) throws CosXmlClientException
public static java.lang.String getSHA1FromBytes(byte[] data, int offset, int len) throws CosXmlClientException
public static java.lang.String getHmacSha1(java.lang.String content, java.lang.String key) throws CosXmlClientException
public static java.lang.String getBase64(java.lang.String content) throws CosXmlClientException
public static java.lang.String getSecurityBase64(java.lang.String content) throws CosXmlClientException
content
- 原始字符串CosXmlClientException