in reply to Re^2: Digest::SHA gives different values for unix/windows
in thread Digest::SHA gives different values for unix/windows
I saw your comment above that the problem seems to be in the transferring of the file. In addition to that, I just wanted to confirm what syphilis suggested: After transfer you should be using the "b" mode. From the Digest::SHA docs (emphasis mine):
The "p" mode is handy since it ensures that the digest value of $filename will be the same when computed on different operating systems. It accomplishes this by internally translating all newlines in text files to UNIX format before calculating the digest. Binary files are read in raw mode with no translation whatsoever.
The name "portable" is a bit confusing here.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Digest::SHA gives different values for unix/windows
by Jim (Curate) on Jun 12, 2013 at 20:30 UTC | |
by zork42 (Monk) on Jun 13, 2013 at 04:50 UTC | |
by Jim (Curate) on Jun 13, 2013 at 19:22 UTC | |
by zork42 (Monk) on Jun 14, 2013 at 07:07 UTC |
In Section
Seekers of Perl Wisdom