public class EncryptUtil extends AbstractEncryptor
charsetName, logger
构造器和说明 |
---|
EncryptUtil() |
限定符和类型 | 方法和说明 |
---|---|
static String |
decode(String encodeMsg,
String key) |
static String |
encode(String msg,
String key)
encode msg
|
static String |
encrypt(String msg,
String key)
加密字符串
DES key size must be equal to 56 DESede(TripleDES) key size must be equal
to 112 or 168 AES key size must be equal to 128, 192 or 256,but 192 and
256 bits may not be available Blowfish key size must be multiple of 8,
and can only range from 32 to 448 (inclusive) RC2 key size must be
between 40 and 1024 bits RC4(ARCFOUR) key size must be between 40 and
1024 bits
|
byte2Hex, hex2Byte
public static String encode(String msg, String key) throws Exception
msg
- msgkey
- keyException
- Exceptionpublic static String encrypt(String msg, String key) throws Exception
msg
- 字符串key
- 密钥Exception
- ExceptionCopyright © 2015 jiucai.org. All rights reserved.