Can the salting function complexity improve the hash robustness? I'm quite novice in security, and all examples I saw seem to salt the password by concatenating it, or by applying a simple binary OR or XOR. So the hash is based on "salt + password", "salt | password", etc.

If I'm right, a hacker should know how the password has been salted in order to retrieve a user password. So, can the complexity of the salting method improve the overall security?
First, good password hashing functions like PBKDF2 and scrypt usually take the password and salt as separate parameters, meaning the user does not have to worry about this. However, with some algorithms they do and in any case the theoretical question is important.

Some of those methods you mention are clearly worse than others:


Binary OR would be particularly bad and I hope it is never used. Any position where the salt has a 1 bit would be 1 regardless of the password bit, so about half the entropy in the password would be lost. (AND would be the same, just with bits reversed.)
XOR is not as bad, but two different salt-password pairs can lead to the same password hash. That makes a parallel attack on many users' passwords easier than it has to be.
Some sort of addition (e.g. byte-wise) would have the same problem as XOR.


The normal method is to concatenate. It loses no entropy and produces a unique input into the hash function for every salt and password. There is really no advantage to doing anything more complex as the user, because that would effectively be just another part of the password hash.