in reply to Digest::SHA gives different values for unix/windows
#supposed to be portable and os independant? not working.
I suspect it is working just fine.
The default FTP translation mode is ASCII, which does line ending localization (LF to CRLF, CRLF to LF, etc.). You don't want this for binary files such as compressed archives. You want binary mode instead. See File_Transfer_Protocol: Communication and data transfer for more details.
It's a good thing you're computing message digests on both of sides of the FTP file transfer. Your strategy worked!