code: public byte[] encryptData(byte[] data) throws SymmetricKeyException {
          Encryptor encryptor = createEncryptor();
          byte[] encrypted = encryptor.encrypt(data);
          byte[] trailer = encryptor.encrypt(null);
          if (encrypted == null || trailer == null)
              throw new SymmetricKeyException("Cannot encrypt data");
          byte[] result = ArrayUtils.concat(encrypted, trailer);
          return result;
      }
docs: Encrypt the byte array data
  @param data Input data
  @return Encrypted data
  @throws SymmetricKeyException