[Tutor] XOR, bytes and strings

Alan Gauld alan.gauld at freenet.co.uk
Wed Jan 4 23:30:04 CET 2006

> now i have the problem that i should encrypt a string (the password) by
> XOR with this bytes: f3, 26, 81, c4, 39, 86, db, 92, 71, a3, b9, e6, 53, 
> 7a, 95, 7c.
> but although i have searched in the documentation for about an hour,

Look for bitwise operators, there is a bitwise xor operator.

Its amazing how often the same topic arises in different threads at the same
time on this list!

You can get a brief into to bitwise operators in my OS topic - look for
the sidebar.

Alan G
Author of the learn to program web tutor

More information about the Tutor mailing list