Not only is it trivial, it is the world's most secure encyption.
It is completely unbreakable
Just need to take care that the password is fully random, and is only used once for encryption.
Trivial yes, completely unbreakable???
Cmon, easily broken but yes for most security encryption it would suffice.
Well, that guy is known to be insufficiently informed.
In theory, and provable, if the key length - only if - is the same size as the encrypted text and has sufficient entropy! XOR encryption is almost/virtually unbreakable (rule number one of statistics: if it has a probability there is a probability) if you have no knowledge about the source text. In the case of a password, however, with the code presented, it is indeed very very easy to break by simple statistics.
That is due to the repeating nature of the password/plaintext. When you hit a common language probability by probing length (easy) and thus determining a viable distribution for characters (which are a known) you can then attempt to decrypt with an almost guaranteed 100% success rate.
Character distribution means that you can even identify most languages if you recovered the password length. Very simple statistics. Both operations. XOR encryption over a shorter key-length has negligible entropy and is therefor unsafe. With the exception I described: key length equals plaintext length.
There's also a matter of very short texts: that scenario can be brute forced. Given the known character distribution over a language.
Also note the time to content ratio: for how long need it to be secret? Most people forget about that. Encryption is as good as the time that it costs to break it.
XOR encryption with a password can best be described as the blurring of an image: you can still see the bigger picture but need the right lens to focus.