类 TripleDESUtils


  • public final class TripleDESUtils
    extends java.lang.Object
    detail: 3DES 对称加密工具类
    作者:
    Ttt
         Triple DES、DESede 进行了三重 DES 加密的算法 ( 对称加密算法 )
     
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static byte[] decrypt​(byte[] data, byte[] key)
      3DES 解密
      static byte[] encrypt​(byte[] data, byte[] key)
      3DES 加密
      static byte[] initKey()
      生成密钥
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 方法详细资料

      • initKey

        public static byte[] initKey()
        生成密钥
        返回:
        密钥 byte[]
      • encrypt

        public static byte[] encrypt​(byte[] data,
                                     byte[] key)
        3DES 加密
        参数:
        data - 待加密数据
        key - 密钥
        返回:
        加密后的 byte[]
      • decrypt

        public static byte[] decrypt​(byte[] data,
                                     byte[] key)
        3DES 解密
        参数:
        data - 待加密数据
        key - 密钥
        返回:
        解密后的 byte[]