nilla@perl.org
Betreff: Re: Wrong SHA1 is calculated
From: Martin Puppe
Sent: Monday, May 15, 2017 8:39 PM
To: win32-vanilla@perl.org
Subject: Wrong SHA1 is calculated
> Hello,
>
> I am debugging a problem with SHA1 checksums. I have found the
> following handy one-liner on Stack Overflow [
Le 16/05/2017 à 13:11, sisyph...@optusnet.com.au a écrit :
Le 15/05/2017 à 16:30, sisyph...@optusnet.com.au a écrit :
Unfortunately, I don't know how to get that binmode() into the
one-liner's angle brackets :-(
$ PERLIO=unix perl -MDigest::SHA1=sha1_hex -le "print sha1_hex <>"
secure.txt
1957
Le 15/05/2017 à 16:30, sisyph...@optusnet.com.au a écrit :
Unfortunately, I don't know how to get that binmode() into the
one-liner's angle brackets :-(
$ PERLIO=unix perl -MDigest::SHA1=sha1_hex -le "print sha1_hex <>"
secure.txt
19576d392b021ac25efdca6f1886b5ce5b1090c4
Yes, I think th
-Original Message-
From: Christian Millour
Sent: Tuesday, May 16, 2017 9:14 AM
To: win32-vanilla@perl.org
Subject: Re: Wrong SHA1 is calculated
Le 15/05/2017 à 16:30, sisyph...@optusnet.com.au a écrit :
Unfortunately, I don't know how to get that binmode() into the
one-liner
Le 15/05/2017 à 16:30, sisyph...@optusnet.com.au a écrit :
Unfortunately, I don't know how to get that binmode() into the
one-liner's angle brackets :-(
you might consider playing with the PERLIO environment variable :
$ perl -E "print qq{hello\nworld\n}" > secure.txt
$ od -c secure.txt
00
From: Martin Puppe
Sent: Monday, May 15, 2017 8:39 PM
To: win32-vanilla@perl.org
Subject: Wrong SHA1 is calculated
Hello,
I am debugging a problem with SHA1 checksums. I have found the following
handy one-liner on Stack Overflow [^1], which serves well as a minimal
example:
perl -MDigest
Hello,
I am debugging a problem with SHA1 checksums. I have found the following handy
one-liner on Stack Overflow [^1], which serves well as a minimal example:
```
perl -MDigest::SHA1=sha1_hex -le "print sha1_hex <>" secure.txt
```
The problem is, that the result is simply not correct. Doing th