类 TripleDESUtils

java.lang.Object
dev.utils.common.encrypt.TripleDESUtils

public final class TripleDESUtils extends Object
detail: 3DES 对称加密工具类
作者:
Ttt
     Triple DES、DESede 进行了三重 DES 加密的算法 ( 对称加密算法 )
 
  • 方法详细资料

    • 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[]