[26176] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8365 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 28 09:05:27 2005

Date: Sun, 28 Aug 2005 06:05:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 28 Aug 2005     Volume: 10 Number: 8365

Today's topics:
    Re: GD::Graph::bars <miroslav@suchy.cz>
    Re: Using Crypt::DSA <sisyphus1@nomail.afraid.org>
    Re: Using Crypt::DSA <mikef@ack.berkeley.edu>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 28 Aug 2005 02:00:53 +0200
From: Miroslav Suchy <miroslav@suchy.cz>
Subject: Re: GD::Graph::bars
Message-Id: <deqv14$jo$1@mrazik2.dkm.cz>

Alexandre Jaquet > wrote:
> Hi,
> 
> I need to print out some text before and after an image,
> how can I commbine text + image

perldoc GD
Look for chapter "Character and String Drawing"


Try this:
use GD;
> use GD::Graph::bars;
> 
> my $img = generate();
> print "Content-type: image/jpeg\n\n";
binmode STDOUT;
> print $img;
> 
> 
> sub generate {
> my @data = ( ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
>               "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
>              [ 10],
>              [ 119] );
> my $graph = GD::Graph::bars->new(300, 300);
> $graph->set( title   => "Evaluation vente",
>              y_label => "Nombre de ventes");
> $graph->set_legend( "Négatif (0)",
>                     "Positif (12)");
> my $gd = $graph->plot(\@data);
$gd->string(gdSmallFont,2,10,"test",$peach);
> 
> return  $gd->jpeg(100);
> }


Miroslav Suchy


------------------------------

Date: Sun, 28 Aug 2005 13:13:38 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Using Crypt::DSA
Message-Id: <43112c10$0$22557$afc38c87@news.optusnet.com.au>


"Mike Friedman" <mikef@ack.berkeley.edu> wrote in message
news:deqmr0$1j2t$1@agate.berkeley.edu...
> Sisyphus <sisyphus1@nomail.afraid.org> wrote:
> >
> > Hmmm ... I run a copy'n'paste of that script and get 2 different files.
The
> > '.priv' file has 'BEGIN DSA PRIVATE KEY',  'END DSA PRIVATE KEY'
delimiters
> > and the '.pub' file has 'BEGIN PUBLIC KEY', 'END PUBLIC KEY' delimiters.
The
> > base64 content is also different.  Are we using the same version of
> > Crypt::DSA ? (I've got 0.13 which, I think, is the latest.)
>
> Rob,
>
> I'm using version 0.12_1, which represents the latest FreeBSD port.  I
> prefer to install from ports because, especially in the case of software
> that has lots of dependencies, installing manually becomes a real
headache.
> (A while back, when I had a Solaris box, I tried to install Crypt::RSA and
> I could never, it seems, get to the end of installing all the
dependencies!).

Yep - either use the CPAN module which "does it all" for you ...... or just
persevere. Most people use CPAN, but I prefer to use perseverance :-)

>
> I see from CPAN that there have been some changes between 0.12 and 0.13,
some
> of which may affect what I've been doing (and asking about).  For example,
> I earlier inquired about the $sig->serialize method and it turns out that
> was introduced in 0.13.

Looking at the documentation for Crypt::DSA::Key in version 0.12, I see *no*
mention of being able to write just the public portion of the key to file.
Perhaps it can't be done. Odd that doing '$key->priv_key(undef);' had no
effect on the file that was written. I guess that instruction must be being
ignored on 0.12. (Perhaps if you had used the warnings pragma in that script
you posted, some mention of that might have been made :-)

>
> Anyway, there doesn't seem to be a port available yet for 0.13.  Since I'm
> just doing prototype testing, for an application that probably won't even
be
> running on FreeBSD, I don't want to get bogged down in version
discrepancies.
> I may just wait for a while to decide what to do.
>

I just noticed a module called Crypt::OpenSSL::DSA which is a DSA
implementation that uses OpenSSL. If you have OpenSSL, you may get better
milage with that module.

Cheers,
Rob




------------------------------

Date: Sun, 28 Aug 2005 07:47:45 +0000 (UTC)
From: Mike Friedman <mikef@ack.berkeley.edu>
Subject: Re: Using Crypt::DSA
Message-Id: <derq71$1s0u$1@agate.berkeley.edu>

Sisyphus <sisyphus1@nomail.afraid.org> wrote:
> 
> I just noticed a module called Crypt::OpenSSL::DSA which is a DSA
> implementation that uses OpenSSL. If you have OpenSSL, you may get better
> milage with that module.

Rob,

Now that's the best advice I've received in a long time!  In just about
15 minutes, I installed Crypt::OpenSSL::DSA (the current version, 0.12)
from a FreeBSD port and created 3 scripts:  to generate and write out a
public and private key (each to a PEM format file), to sign a message
and to verify a message.

The interface is so much simpler than with Crypt::DSA.

Thanks very much.  I now have something to work with.

Mike
> 
> 


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 8365
***************************************


home help back first fref pref prev next nref lref last post