Mac port & endianness
Robert Olson <[email protected]>
| Newsgroups | gmane.comp.security.passwordsafe.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi --
I'm hacking on a native mac port of the passwordsafe app as a side
project. After a fair bit of effort I've got the corelib compiling
(among other things, I needed to replace the use of the MS CString
and CList classes with the STL equivalents). However, I cannot
convince PWSfile::CheckPassword to succeed on a password file I
created earlier using the windows passwordsafe. I fear that I am
hitting a subtle endian issue somewhere. I see the blowfish code has
endian assumptions here:
union aword
{
unsigned long word;
unsigned char byte [4];
struct
{
unsigned int byte3:8;
unsigned int byte2:8;
unsigned int byte1:8;
unsigned int byte0:8;
} w;
};
but reversing the order of the bytes in the struct didn't help. I've
not yet done a detailed study of what exactly is going on (it doesn't
help that I don't have a windows machine here at the moment to
compare intermediate results), but was wondering if anyone has run
into similar issues.
Thanks,
--bob
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20