in reply to Hiding DBI Passwords?

encrypt your uname & password with a scheme that has a perl implementation.
Note that this is all pseudocode-y ...
this'll get you something like
$uname = "asdf332112312adfasdf"; $pass = "wurtqeriotu1231211"; #assume these are encryped, not gibberis +h :)
then call your script with an extra parameter, the crypt key.
my $dbh = DBI->connect('DBI:mysql:database=audic;host=localhost', unencrypt_routine ($uname, $key), unencrypt_routine ($pass, $key))
update did I mention this is off the top of my head? :)

Replies are listed 'Best First'.
Re: Re: Hiding DBI Passwords?
by rrwo (Friar) on Feb 20, 2001 at 01:31 UTC

    Bad idea. Anybody smart enough to look in the code to try and find the password will be smart enough to decrypt it.

      Deletia
      update I seem to have misunderstood what was happening, or misrepresented what my original thought on the matter was, or maybe just didn't explain well enough. Your --s have spoken loudly enough, and I will drop the subject...

      updated

        Make it the same challenge that he posted about. Provide the key too.. You can't lock a house and hang the key from a string on the porch. The example you provided is no more secure than just having the password in there...

        --
        $you = new YOU;
        honk() if $you->love(perl)