类 DbAESUtil

java.lang.Object
com.sie.mbm.mom.framework.db.flex.util.DbAESUtil

public class DbAESUtil extends Object
  • 字段详细资料

    • DEFAULT_CIPHER_ALGORITHM

      private static String DEFAULT_CIPHER_ALGORITHM
    • KEY_ALGORITHM

      private static String KEY_ALGORITHM
    • AES_KEY

      public static String AES_KEY
  • 构造器详细资料

    • DbAESUtil

      public DbAESUtil()
  • 方法详细资料

    • encrypt

      private static byte[] encrypt(Key key, byte[] messBytes) throws Exception
      加密
      参数:
      key -
      messBytes -
      返回:
      抛出:
      Exception
    • decrypt

      private static byte[] decrypt(Key key, byte[] cipherBytes) throws Exception
      AES(256)解密
      参数:
      key -
      cipherBytes -
      返回:
      抛出:
      Exception
    • getKeyGenerator

      private static KeyGenerator getKeyGenerator()
      生成加密秘钥
      返回:
      抛出:
      NoSuchAlgorithmException
    • encrypt

      public static String encrypt(String message)
    • decrypt

      public static String decrypt(String ciphertext)