dereferencing

Discussion in 'Perl Misc' started by lucas, Jan 5, 2004.

  1. lucas

    lucas Guest

    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
    --
    lucas
    -------------------------
    Perl Coder since 2001
    shift || die;
    -------------------------
     
    lucas, Jan 5, 2004
    #1
    1. Advertising

  2. lucas

    gnari Guest

    "lucas" <> wrote in message
    news:p...
    > 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
     
    gnari, Jan 5, 2004
    #2
    1. Advertising

  3. lucas

    lucas Guest

    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.

    --
    lucas
    -------------------------
    Perl Coder since 2001
    shift || die;
    -------------------------
     
    lucas, Jan 5, 2004
    #3
  4. lucas <> wrote:

    > 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


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jan 5, 2004
    #4
  5. lucas

    lucas Guest

    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

    --
    lucas
    -------------------------
    Perl Coder since 2001
    shift || die;
    -------------------------
     
    lucas, Jan 6, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe McGuckin

    Dereferencing ?

    Joe McGuckin, Nov 28, 2003, in forum: Perl
    Replies:
    1
    Views:
    510
    Gunnar Hjalmarsson
    Nov 28, 2003
  2. J. Campbell
    Replies:
    4
    Views:
    1,175
    Simon G Best
    Jul 17, 2003
  3. Larry Lindsey
    Replies:
    1
    Views:
    429
    Larry Lindsey
    Sep 24, 2003
  4. Peter L.
    Replies:
    3
    Views:
    379
    Jakob Bieling
    Feb 17, 2004
  5. Martin Zimmermann
    Replies:
    2
    Views:
    491
    Rob Williscroft
    Apr 14, 2004
Loading...

Share This Page