类 DESUtils


  • public final class DESUtils
    extends java.lang.Object
    detail: DES 对称加密工具类
    作者:
    Ttt
         Data Encryption Standard 数据加密标准 ( 对称加密算法 )
     
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static byte[] decrypt​(byte[] data, byte[] key)
      DES 解密
      static byte[] encrypt​(byte[] data, byte[] key)
      DES 加密
      static java.security.Key getDESKey​(byte[] key)
      获取可逆算法 DES 的密钥
      • 从类继承的方法 java.lang.Object

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

      • getDESKey

        public static java.security.Key getDESKey​(byte[] key)
        获取可逆算法 DES 的密钥
        参数:
        key - 前八个字节将被用来生成密钥
        返回:
        可逆算法 DES 的密钥
      • encrypt

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

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