com.datecs.crypto

## Class AES

- java.lang.Object
- - com.datecs.crypto.AES

-     public final class AES
      extends java.lang.Object

  Helper methods to encrypt or decrypt with AES algorithm.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AES()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `decryptCBC(byte[] keyBytes, byte[] dataBytes)` Decrypt data using CBC mode and zero initialization vector.
    `static byte[]` | `decryptCBC(byte[] keyBytes, byte[] ivBytes, byte[] dataBytes)` Decrypt data using CBC mode.
    `static byte[]` | `decryptECB(byte[] keyBytes, byte[] dataBytes)` Decrypt data using ECB mode.
    `static byte[]` | `encryptCBC(byte[] keyBytes, byte[] dataBytes)` Encrypt data using CBC mode and zero initialization vector.
    `static byte[]` | `encryptCBC(byte[] keyBytes, byte[] ivBytes, byte[] dataBytes)` Encrypt data using CBC mode.
    `static byte[]` | `encryptECB(byte[] keyBytes, byte[] dataBytes)` Encrypt data using ECB mode.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AES

          public AES()

  - ### Method Detail

    - #### encryptECB

          public static byte[] encryptECB(byte[] keyBytes,
                                          byte[] dataBytes)

      Encrypt data using ECB mode.
      Parameters:
        `keyBytes` - the key bytes.
        `dataBytes` - the data.
      Returns:
        encrypted data.

    - #### encryptCBC

          public static byte[] encryptCBC(byte[] keyBytes,
                                          byte[] ivBytes,
                                          byte[] dataBytes)

      Encrypt data using CBC mode.
      Parameters:
        `keyBytes` - the key bytes.
        `ivBytes` - initialization vector.
        `dataBytes` - the data.
      Returns:
        encrypted data.

    - #### encryptCBC

          public static byte[] encryptCBC(byte[] keyBytes,
                                          byte[] dataBytes)

      Encrypt data using CBC mode and zero initialization vector.
      Parameters:
        `keyBytes` - the key bytes.
        `dataBytes` - the data.
      Returns:
        encrypted data.

    - #### decryptECB

          public static byte[] decryptECB(byte[] keyBytes,
                                          byte[] dataBytes)

      Decrypt data using ECB mode.
      Parameters:
        `keyBytes` - the key bytes.
        `dataBytes` - the data.
      Returns:
        decrypted data.

    - #### decryptCBC

          public static byte[] decryptCBC(byte[] keyBytes,
                                          byte[] ivBytes,
                                          byte[] dataBytes)

      Decrypt data using CBC mode.
      Parameters:
        `keyBytes` - the key bytes.
        `ivBytes` - initialization vector.
        `dataBytes` - the data.
      Returns:
        decrypted data.

    - #### decryptCBC

          public static byte[] decryptCBC(byte[] keyBytes,
                                          byte[] dataBytes)

      Decrypt data using CBC mode and zero initialization vector.
      Parameters:
        `keyBytes` - the key bytes.
        `dataBytes` - the data.
      Returns:
        decrypted data.