public class DES extends Object
支持 DES、DESede(TripleDES,就是3DES)、AES、Blowfish、RC2、RC4(ARCFOUR) 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
public static String decryptDES(String data, String key)
data - 需要解密的字符串key - 密钥public static String encryptDES(String data, String key)
data - 需要加密的字符串key - 密钥public static String changeHex(int a)
a - 整数public static byte[] hexString2Bytes(String hexstr)
hexstr - 十六进制字符串Copyright © 2023. All rights reserved.