-
3DES查看全部
-
3DES查看全部
-
对称加密算法-DES查看全部
-
DES查看全部
-
对称加密算法查看全部
-
CSS3 + h5ikkkkkkkkkkkkkkkkk查看全部
-
public class DESDemo { private static String src = "mayue des"; public static void main(String[] args) { try { //生成key KeyGenerator generator = KeyGenerator.getInstance("DES"); generator.init(56); SecretKey secretKey = generator.generateKey(); byte[] keyCode = secretKey.getEncoded(); //key转换 DESKeySpec desKeySpec = new DESKeySpec(keyCode); SecretKeyFactory factory = SecretKeyFactory.getInstance("DES"); SecretKey converyKeyCode = factory.generateSecret(desKeySpec); //加密 Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, converyKeyCode); byte[] rlt = cipher.doFinal(src.getBytes()); System.out.println("jdk des encrypt:"+Hex.encodeHexString(rlt)); //解密 cipher.init(Cipher.DECRYPT_MODE, converyKeyCode); rlt = cipher.doFinal(rlt); System.out.println("jdk des decrypt:"+new String(rlt)); } catch (Exception e) { e.printStackTrace(); } } }查看全部
-
DES解密步骤查看全部
-
DES 加密过程查看全部
-
jdk版的加密查看全部
-
encode/decode查看全部
-
mark查看全部
-
jdk3DES查看全部
-
DES消息传递查看全部
-
bcDES查看全部
举报
0/150
提交
取消