public class MD5 extends Digester
digestCount, salt, saltPosition
Constructor and Description |
---|
MD5()
构造
|
MD5(byte[] salt)
构造
|
MD5(byte[] salt,
int digestCount)
构造
|
MD5(byte[] salt,
int saltPosition,
int digestCount)
构造
|
Modifier and Type | Method and Description |
---|---|
static MD5 |
create()
创建MD5实例
|
String |
digestHex16(byte[] data)
生成16位MD5摘要
|
String |
digestHex16(File data)
生成16位MD5摘要
|
String |
digestHex16(InputStream data)
生成16位MD5摘要
|
String |
digestHex16(String data)
生成16位MD5摘要
|
String |
digestHex16(String data,
Charset charset)
生成16位MD5摘要
|
public MD5()
public MD5(byte[] salt)
salt
- 盐值public MD5(byte[] salt, int digestCount)
salt
- 盐值digestCount
- 摘要次数,当此值小于等于1,默认为1。public MD5(byte[] salt, int saltPosition, int digestCount)
salt
- 盐值saltPosition
- 加盐位置,即将盐值字符串放置在数据的index数,默认0digestCount
- 摘要次数,当此值小于等于1,默认为1。public static MD5 create()
public String digestHex16(String data, Charset charset)
data
- 数据charset
- 编码public String digestHex16(String data)
data
- 数据public String digestHex16(InputStream data)
data
- 数据public String digestHex16(byte[] data)
data
- 数据Copyright © 2024. All rights reserved.