code: protected static final byte[] encrypt(byte[] data, byte[] key, String cipher) throws Exception {
          SecretKey sKey = constructSecretKey(key, cipher);
          Cipher ci = createCipher(Cipher.ENCRYPT_MODE, key, cipher, sKey);
          return ci.doFinal(data);
      }
docs: Encrypt the data.
  
  @param data The byte representation of the data
  @param key The key used to encrypt the data
  @param cipher The cipher algorithm
  @return The encrypted data (ciphertext)