public static byte[] executeFunction(byte[] block, byte[] subkey) throws IllegalArgumentException {
        if (block.length != 4)
            throw new IllegalArgumentException("Block should be 4 bytes long.");
        else if (subkey.length != 6)
            throw new IllegalArgumentException("Key should be 6 bytes long.");
        
        // Send data through expansion table
        byte[] transmutedBlock = ByteHelper.permutFunc(block, Feistel.expansionTabel42Bits);
        // xor data with subkey
        byte[] xoredBytes = ByteHelper.xorByteBlocks(transmutedBlock, subkey);
        // execute S function on data
        byte[] result = executeS(xoredBytes);
        // send data through permutation table
        byte[] feistelResult = ByteHelper.permutFunc(result, Feistel.permutatieTabel32Bits);
        return feistelResult;
    }