Eric66 has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use MIME::Base64 (); use Digest::SHA1 qw(sha1 sha1_hex sha1_base64); use Crypt::OpenSSL::RSA; my $string = "0021232117891234AcquirerStatusRes2004-11-02T15:05:03.750 +ZSuccess"; #SHA encryption my $ctx = Digest::SHA1->new; $ctx->add($string); my $digest = $ctx->digest; my $len = length($digest); print ("SHA-1 DIGEST:$digest.. ($len)\n\n"); #RSA-encryption over the digest ????? #Base64 encoding: my $encoded = MIME::Base64::encode($digest); my $len1 = length($encoded); print ("ENCODE:$encoded ($len1)\n\n"); The result has to be (172 chars): db82/jpJRvKQKoiDvu33X0yoDAQpayJOaW2Y8zbR1qk1i3epvTXi+6g+QVBY93YzGv4w+V +a+vL3uNmzyRjYsm2309d1CWFVsn5Mk24NLSvhYfwVHEpznyMqizALEVUNSoiSHRkZUDfX +owBAyLT/tQVGbuUuBj+TkblY826nRa7U=
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RSA encryption for (Ducth) iDeal payment
by flexvault (Monsignor) on May 05, 2011 at 14:55 UTC | |
by Eric66 (Initiate) on May 06, 2011 at 07:30 UTC | |
by flexvault (Monsignor) on May 06, 2011 at 14:07 UTC | |
by flexvault (Monsignor) on May 06, 2011 at 15:03 UTC | |
|
Re: RSA encryption for (Ducth) iDeal payment
by JavaFan (Canon) on May 05, 2011 at 17:29 UTC |