dereferencing

L

lucas

I need help with some RSA crypto. I emailed the author, but receive no
response.

After I generate the keypair, I have $public and $private, however these are
just references, and I need the actual keys to send between a server and a
client, and to save the hard drive. I tried to dereference $public, but
all I got was the Identity, etc.

thx
 
G

gnari

lucas said:
I need help with some RSA crypto. I emailed the author, but receive no
response.

After I generate the keypair, I have $public and $private, however these are
just references, and I need the actual keys to send between a server and a
client, and to save the hard drive. I tried to dereference $public, but
all I got was the Identity, etc.

some bits of advice:
when asking for help here, it is more effective if you give us some details,
or else you risc getting references to the various ESP modules

also, it is a goot idea to use a Subject line that matches the subject.
a mention of the module you use would attract those that have used it,
but 'deferencing' might interest a totally different crowd.
a side effect of good Subject lines is that they get found later in google


sure, after visiting search.cpan.org, i can guess that you probably are
using
the Crypt::RSA module, because of your variable names. in that case there
is
some mention in that modules doc, of Crypt::RSA::Key::private and
Crypt::RSA::Key::public

if a am wrong, then please be more specific

gnari
 
L

lucas

I think I found what I needed in 'man Crypt::RSA::Key::public'. I have to
save the generated key to disk, then read it and send it through the
network. Then the server has to save the key to disk, then read it to get
the reference varible. Quite a pain in the ass.
 
T

Tad McClellan

lucas said:
After I generate the keypair, I have $public and $private, however these are
just references,


What are they references _to_ ?

If it is a reference to an array, you dereference it one way, if it
is a reference to a hash you dereference it another way.

All of the ways are covered in:

perldoc perlreftut
perldoc perlref
 
L

lucas

Tad McClellan wrote:

References to a hash: Crypt::RSA::Key::public=HASH(0x8473e4c), in my other
post, I mentioned how I got some information from $public
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top