Hello Monks,

I have simple question for you. I am newbie at Perl. I want to have apassword encryption and decryption mechanism in my perl script. Write now hte password that I use in my script is a clear text passwordand my scripts works fine wiht it. so, I want to get rid of the clear text password.

So far after doing a lot of googling, I came accorss following 3 modules whihc could be useful for my use case

Crypt::CBC Crypt::Twofish_PP MIME::Base64

I am just not able to get it right with either of them. Eeither I am too naive to understand these modules OR I am running after the wrong stuff.

So, this is what i want to:

1) encrypt the password in a dedicated perl script 2) Use this encrypted password in my perl script (where right now I have clear text password), tun a subrouting to decrypt this password and then retunr the necessary password to the caller so that my Perl script continue to execute.

Could you give me guidance on how to proceed. Thanks.


In reply to Password Encryption and Decryption by slayedbylucifer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.