I\'m making a XOR based en/decryptor, that works like this. You have a plaintext character, for example 3, and a user key, for example 5. Written in bits:
3 = 00
i found some XOR encryption codes online which might help you
it is a beautifully written code in c https://code.google.com/p/xorencryption/
written in c++ http://programmingconsole.blogspot.in/2013/10/xor-encryption-for-alphabets.html