in reply to can perl help me with secure PIN management via database?

How many of these are you going to assign each second? If it's one or less, then why not just use the current time. The number of seconds since Jan 1st 1970 currently contains 10 digits and you can get that using time.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re: Re: Any possible heeeelp please??
by jcsimba (Initiate) on Jan 30, 2003 at 17:41 UTC
    Hi Dave.. How many per second...well that is a bit unpredictable! possibly a number or just one! Not much help maybe I know... But this would be for a client who will be selling 'calling cards' online and after payment for such, a customer needs to a 'pin-number' (10 digits long) emailed to them or produced on their screen. But this can't be a random number other than one 'plucked' from a database or other type of file on the server (asny suggestions welcomed!) Any help Dave Thanks
      Hi ,

      use strict; use CGI; #use some mail module like MIME::Lite open(Filenm,"filenames.csv") || die "the file is not ready +to be opened"; while (<Filenm>){ local $/; # Here the file's size is important, for a lesser size t +his is ok my @pindigits = split(',',$_); $pinforphonecard = shift(@pindigits); # have the cgi stuff and MIME::Lite or any that you u +se for mailing part with the $pinforphonecard as the one to be let to + send # then go ahead and remove the $pinforphonecard and a co +mma from the file $_ =~ s/$pinforphonecard,//g; last; }


      You should actually go for Tie::Db... as Merlyn observes, as you insist on csv , you could do this way
        Hi there, Well it doesn't have to be 'csv'...but so long as the number(s) can be retrieved and then automatically be deleted (or blanked out from further usage!) from some type of file on the server. Thank you for all the help/advice so far!
        Well it doesn't have to be a 'csv' file, it can be another type of file...so long as when a 'pin number' is returned to the customer via broswer or email..that that number is then deactivated from the server 'storage file'.