After some deep thought today, I achieved my desired goal by xoring each individual byte. I could swear I tried this before, but anyhoo it's working now!

put byte 5 to 12 of tPointData into tEncLat -- read out lats, lons and keys from 129 bytes of tPointData

put byte 13 to 20 of tPointData into tEncLon


put Byte 127 of tPointData into tKey1 -- get Encryption bytes from tPointData

put byte 128 of tPointData into tKey2

put byte 129 of tPointData into tKey3

etcetera...


-- decrypt lat

replace byte 4 of tEncLat with numToByte((byteToNum(byte 4 of tEncLat) bitXor (byteToNum(tKey1)))) in tEncLat

replace byte 5 of tEncLat with numToByte((byteToNum(byte 5 of tEncLat) bitXor (byteToNum(tKey2)))) in tEncLat

replace byte 6 of tEncLat with numToByte((byteToNum(byte 6 of tEncLat) bitXor (byteToNum(tKey3)))) in tEncLat


Thanks anyway, I was starting to panic after promising an alpha before Christmas!!

Regards

Neil

From: "Alex Tweedly" <[email protected]>
To: "How to use Revolution" <[email protected]>
Sent: Wednesday, December 09, 2009 12:04 AM
Subject: Re: bitXor 8 bytes of data


Neil Allan wrote:
Does anyone have a way of doing a "simple" bitwise xor with two 8 byte signed floating point numbers?

I believe the revTalk bitXor command can only accept non signed "numbers".

I have tried performing the bitXor byte by byte on the two strings using the byteToNum() function on each byte individually but the result is quite different to what one would get banging the hex equivalent of the string into "calculator" on windows.

Calculator gives me the correct answer. I set it to hex mode then just type in the 8 bytes of hex, hit xor, type in the other hex string and "="

Any Ideas?

bitXor() will do what you want. Can you show a more complete code
fragment (including the data you used) and we'll see if it's something
about how you're setting the data up ?

Thanks
-- Alex.
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.426 / Virus Database: 270.14.98/2552 - Release Date: 12/08/09 07:34:00

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to