Hey guys,
I'm stumped with the Swordfish XTEA encryption code. Changing it over to PBPL 2.50 is difficult due to the fact it will only support 32 bit signed integers, not unsigned. Plus, in the structured environment, the variables are resized in each subroutine(ie. word or longword).
I can do separate variables in each sub, but the 32 bit math seems tricky. Would a long addition of one to$7FFFFFFF, make $80000000, or $00000000 with some kind of carry? Also, would the carry be lost, or is it recoverable somewhere?
Am I better off trying to break up the math operations into word variables?
The code is attached, any help would be greatly appreciated.
Thanks,
Ron
PS. I am buying Swordfish, so I don't feel bad about changing the code to fit a current project.
Bookmarks