I also had trouble grokking her question, but I'm pretty sure that your solution is not what she wants. I think she wants a reversable solution, and IIRC, a good hash function is _never_ reversable. She also mentions that she doesn't want to use an external db... if she were willing to do so, then an autonumber id field would make a lot more sense than a hashed e-mail, IMHO. Unless I'm mistaken, no hashing function can guarantee that two inputs will generate unique outputs. I can appreciate your suggestion, though - her question doesn't make sense until you realize how simple her goal is. I think what she needs is just rot13 or any other cipher.
try http://www.cpan.org/modules/by-category/14_Security_and_Encryption/, Sara. Or, just try to think up a way to scramble text... there are MANY ways. --- Helphand <[EMAIL PROTECTED]> wrote: > To: "Sara" <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> > From: Helphand <[EMAIL PROTECTED]> > Subject: Re: encrypting email address (to prevent > spam) > Date: Wed, 17 Dec 2003 19:06:58 -0800 > > At 09:53 AM 12/15/03 +0500, Sara wrote: > > > >What I am looking for a way to compelety change the > email addy layout by > >replacing it with unguessable alphabets and numbers > or either of those and > >vice versa. eg. > > > >$email = <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]"; > > > >using some search and replace/translate function ? > > > >$email = "blah..3b92a98ualwetwe334...blah"; > > > >and then translating it back to email when needed. > > > >Thanks for any input. > > > >Sara. > > > > > Turn it into an MD5 hash, then no one can guess > it. Check out the > module, Digest::MD5 on CPAN > > > http://search.cpan.org/~gaas/Digest-MD5-2.33/MD5.pm > > Basically, you convert the email address to an > MD5 hash, store > it in a database with the hash as the key. To > retrieve the > email address, just lookup the hash in the database. > > Scott > > > > > > Utilities for POPFile, the OpenSource Mail > Classifier > http://www.geocities.com/Helphand1/popfile.htm __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
