Re: Problems with Crypt::RIPEMD160 - modperl

This is a discussion on Re: Problems with Crypt::RIPEMD160 - modperl ; Start with this: #!/usr/bin/perl # # Always do these use strict; use warnings; use Crypt::RIPEMD160; my $ripemd160 = new Crypt::RIPEMD160; $ripemd160->add('a'); my $digest = $ripemd160->digest(); print "Content-Type: text/plain\n\n"; print("Digest is " . unpack("H*", $digest) . "\n"); Jens Gassmann wrote: > ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Problems with Crypt::RIPEMD160

  1. Re: Problems with Crypt::RIPEMD160

    Start with this:

    #!/usr/bin/perl
    #

    # Always do these
    use strict;
    use warnings;

    use Crypt::RIPEMD160;


    my $ripemd160 = new Crypt::RIPEMD160;
    $ripemd160->add('a');
    my $digest = $ripemd160->digest();


    print "Content-Type: text/plain\n\n";
    print("Digest is " . unpack("H*", $digest) . "\n");


    Jens Gassmann wrote:
    > Hi,
    >
    > we need RIPEMD160-Hashes for our mod_perl-app. The testscript attached
    > worked on commandline, but not with mod_perl. There it returns a wrong
    > Hash => 0123456789abcdeffedcba9876543210f0e1d2c3
    >
    > Whats wrong? Where could i get start to catch the error?
    >
    > Attached the for linux amd64 working version of Crypt::RIPEMD160
    > http://www.atomix.de/Crypt-RIPEMD160-0.05.tar.gz
    >
    > regards,
    > Jens
    >


    --
    Jim Brandt
    Administrative Computing Services
    University at Buffalo


  2. Re: Problems with Crypt::RIPEMD160

    Hi Jim,

    > # Always do these
    > use strict;
    > use warnings;
    >
    > use Crypt::RIPEMD160;


    sorry - the example code was too quick and short - i always use strict
    and warnings. But with strict and warnings the calculated hash is wrong
    too. :-)

    Regards,
    Jens


+ Reply to Thread