This isn't critical but it's peeked my curiosity and I haven't been able to fix it yet.
I used the sha256.c/.h that was in SmaugFUSS in a ROM code base. I changed ROM to use that crypt function instead the native crypt (so it will work across platforms), it was from SmaugFUSS though so that's why I'm posting here.
So, it works under Ubuntu and Raspbian creating identical hashes. The same code unaltered under Windows creates a different hash. I've compared the char arrays passed in and they look identical. The Windows version creates consistent hashes in Windows (e.g. if you never ran it off Windows you wouldn't know the difference, but the hash for the same password is different than what the Linux version produces).
Also, I may not understand what the sha256_crypt function is doing, but it's not generating actual sha256 hashes for the provided text in either environment (maybe it's salting it and that's why but it didn't look like it was).
- Could this be an encoding issue between environments?
- Could this be a difference between 32-bit Linux/64-bit Windows somehow?
Thanks in advance for any thoughts or advice! ;-)
I used the sha256.c/.h that was in SmaugFUSS in a ROM code base. I changed ROM to use that crypt function instead the native crypt (so it will work across platforms), it was from SmaugFUSS though so that's why I'm posting here.
So, it works under Ubuntu and Raspbian creating identical hashes. The same code unaltered under Windows creates a different hash. I've compared the char arrays passed in and they look identical. The Windows version creates consistent hashes in Windows (e.g. if you never ran it off Windows you wouldn't know the difference, but the hash for the same password is different than what the Linux version produces).
Also, I may not understand what the sha256_crypt function is doing, but it's not generating actual sha256 hashes for the provided text in either environment (maybe it's salting it and that's why but it didn't look like it was).
- Could this be an encoding issue between environments?
- Could this be a difference between 32-bit Linux/64-bit Windows somehow?
Thanks in advance for any thoughts or advice! ;-)