At first, I really thank you very much!

I write a test demo like this:

#!/usr/bin/perl -w

use strict;

my $open ="|"."/usr/local/bin/openssl".">/usr/local/Perl_test/stdout.log";
my $OPENSSL;
open $OPENSSL ,$open ;


print {$OPENSSL} "dgst -sha1 \n";
 print {$OPENSSL} "lampa\x00";
 print {$OPENSSL} "exit\n";
close  $OPENSSL;

And then ,the hash is "df4af65888e7495e742b55368b7b641e67e5bf2c",which is
found in /usr/local/Perl_test/stdout.log

The demo is same as the OpenCA PIN process and the hash is also same as the
hash value in the OpenCA.
Now, the question is that what string exactly is hashed by the above code.
Because the hash value of the String "lampa" is
"34f188585ef3c4c5ab532b0f1508a54ee3d609db",which is defferent from the test
demo.
Whether I must add some control char to the String ?
Thank you again!
lampa
-- 
View this message in context: 
http://www.nabble.com/Question-about-PIN-tp20536999p20576830.html
Sent from the openca-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Openca-Users mailing list
Openca-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openca-users

Reply via email to