public abstract class PwdUtil extends Object
| 构造器和说明 |
|---|
PwdUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
Base64ToString(String key)
Base64解压
|
static String |
Decrypt3DES(String value)
用配置文件的配置做为key解密
|
static String |
Decrypt3DES(String value,
String key)
通过key 用3DES加密,是Encrypt3DES的逆过程
|
static String |
Encrypt3DES(String origValue)
用配置文件的配置做为key加密
|
static String |
Encrypt3DES(String origValue,
String key)
通过key 用3DES加密
|
static byte[] |
fromBase64(String p_Str)
把base64字符转原文的字节码
|
static byte[] |
md5(byte[] data) |
static byte[] |
md5(InputStream is) |
static String |
MD5(String s)
产生MD5编码
|
static byte[] |
sha(byte[] data) |
static byte[] |
sha(InputStream is) |
static String |
StringToBase64(String key)
Base64压缩
|
static String |
toBase64(byte[] bPic)
把原文件转为base64编码
|
public static final String StringToBase64(String key)
key - 要压缩的文字public static final String Base64ToString(String key)
key - 要解压的base码public static String Encrypt3DES(String origValue, String key)
origValue - 要加密的数数据key - 加密用的keypublic static String Encrypt3DES(String origValue)
origValue - 要加密的数数据public static String Decrypt3DES(String value, String key)
value - 要解密的密文key - 要解密的key值public static String Decrypt3DES(String value)
value - 要解密的密文public static byte[] fromBase64(String p_Str) throws IOException
p_Str - base码IOException - 转码异常public static String toBase64(byte[] bPic)
bPic - 文件的byte字节public static byte[] md5(byte[] data)
public static byte[] md5(InputStream is) throws IOException
IOExceptionpublic static byte[] sha(byte[] data)
public static byte[] sha(InputStream is) throws IOException
IOExceptionCopyright © 2017. All rights reserved.