Game Development Community

Encrypting Text

by Aditya Kulkarni · in Torque Game Builder · 05/31/2010 (1:08 am) · 2 replies

I found this resource which does what I want. But I don't have the pro version yet.
http://www.torquepowered.com/community/resources/view/14715

Basically, I save the profiles like so:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<profiles>
<user>
<name>test</name>
<level>1</level>
</user>
</profiles>

I tried XORing the characters, but it always gives the key as the result, i.e."c"^129 or "d"^129 both give 129.

How do i encrypt it, so that it's 'xml safe' using torquescript?

#1
06/02/2010 (3:36 pm)
To turn enciphered plain text into XML-safe characters, encipher the test using XOR or any other method you like. Then break the stream into five-bit chunks. Write each five-bit chunk into a byte (with the three high-order bits as zeroes). That will guarantee a printable character as a result. It's the only method I know to transmit binary data as text. There's a more thorough explanation at

http://en.wikipedia.org/wiki/Uuencode
#2
06/03/2010 (5:25 am)
Cool. Thanks for the link Nikos.