Fixed xor encryption and changed to printstream

XOR was redone much like this:
http://stackoverflow.com/questions/13641563/xor-cipher-in-java-php-different-results