On Thu, Jun 4, 2009 at 6:03 PM, Ken Tozier <kentoz...@comcast.net> wrote: >> Iff you're running it on an Intel CPU, simply compile the code for ppc and >> use the 'arch' command to run that slice instead of the native slice. If it >> doesn't produce the same output, then you have an implied-endian bug. If it >> does produce the same output, you still have a bug. > > Is it possible to compile a single class in a project to PPC while > everything else in the project compiles to Intel?
Nope. Rosetta does not support mixed mode operation. Either everything in a process must be PPC, or none of it. >> If you're using an Intel CPU, maybe try finding a little-endian >> implementation of the algorithm. > > No luck on that front. Huh? You said you have a working version from the MySQL source. You have some broken code intending to execute a certain algorithm. You also have some working code which executes that same algorithm. (And if you don't, there are probably literally hundreds of open source examples available on the internet.) Set them both up in parallel to run on identical data, then step through them both in the debugger line by line until the internal states diverge. Now that you know where things go wrong, look at the code and see what's different. This is elementary debugging, in one of the easiest imaginable scenarios. And once you've found and fixed the problem and hopefully learned something in the process, please delete all of your code and use one of the SHA-1 functions provided by the OS. There is no excuse for writing your own crypto code for production use in this day and age. Mike _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com