in reply to Re: Crypt::RSA problem
in thread Crypt::RSA problem

But if I create the keys and use them directly (no writing to and reading from file) it all works fine.
Maybe this is interesting: If I print the key before writing I get the following:
key=Password valu=A day so foul & fair key=Version valu=1.91 key=Checked valu=0 key=Identity valu=Lord Macbeth <macbeth@glamis.com> ..... key=_phi=> 7210735926686440535829990956186709974464809186521836 +355832311976096790529618024634910931659740003773771843595827999358462 +719066220022694321619622387401960 ..... key=_n=> 721073592668644053582999095618670997446480918652183635 +583231197609679052961819700359005877557710889766589552041195848079762 +1578108309291796942263931673339 ..... key=_q=> 100915410784627151408499821928866674137454562910056455 +419204814119795206900509 ..... key=_u=> 714532683424886856966240721230579098216677719924554328 +67392661202846337370871 ..... key=_dp=> 55244914096508209456284400117059592742268460981246650 +212332286378244672760967 ..... key=_dq=> 36302843828674577225696808359880055897158426599215535 +471345551979357835961943 ..... key=_d=> 880471060418539224794851735339212418508575599615030917 +0194136550910004929385 ..... key=_e=> 641184135470923308460913000233054168594704091053521728 +905021305093331347031478407043455534130351495979870847598261273194948 +5272487877726082773168046267553 ..... key=_p=> 65537 key=Cipher valu=Blowfish
If I print the code after writing it to file (so I haven't red it yet!):
key=Version valu=1.91 key=Checked valu=0 key=Identity valu=Lord Macbeth <macbeth@glamis.com> key=private_encrypted valu=Tie::EncryptedHash=HASH(0x8451cb0) key=Cipher valu=Blowfish


Luca

Replies are listed 'Best First'.
Re^3: Crypt::RSA problem
by jeanluca (Deacon) on Sep 26, 2005 at 13:34 UTC
    If I remove Password from the keygen everything works fine !! How do I write and read a key using a password ?

    Oooh I fixed it, it is simple:$private = new Crypt::RSA::Key::Private( Filename => 'rsa.private', Password => 'A day so foul & fair' ); Luca