类 AESUtils


  • public final class AESUtils
    extends java.lang.Object
    detail: AES 对称加密工具类
    作者:
    Ttt
         Advanced Encryption Standard 高级数据加密标准 ( 对称加密算法 )
         AES 算法可以有效抵制针对 DES 的攻击算法
     
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static byte[] decrypt​(byte[] data, byte[] key)
      AES 解密
      static byte[] encrypt​(byte[] data, byte[] key)
      AES 加密
      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)
        AES 加密
        参数:
        data - 待加密数据
        key - 密钥
        返回:
        加密后的 byte[]
      • decrypt

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