Given that the key is basically just a very large integer number and given that any password (or a hash thereof) can also be represented by a equally large integer, you can xor the key(-number) K with the password(-number) P and get a new large number N.
Means K^P = N and N^P = K
Let's assume for the below example that we deal only with numbers up to 15 (4 bits), let K be 13 and let P be 9, the result of xoring them is 4 (see below):
13 = 1101
^
9 = 1001
=========
4 = 0100
XOR is deployed in Hashing algorithms to provide randomness that further ensures the irreversibility.
There is a limitation with XOR that if Password (P) is 0 then N will be same as the Key (K) or if if Password (P) is a stream of 1 then N will be a stream of zero.
13 = 1101
^
0 = 0000
=========
13 = 1101
13 = 1101
^
1 = 1111
=========
0 = 0000