funkmasta55 has asked for the wisdom of the Perl Monks concerning the following question:

I am taking over a site for a client, and trying to move their application to a new server environment. The old SA is nowhere to be found, and i am trying to figure out all the configurations he put on the old site.

One of the issues i have encountered is a function to read a cookie, where he is using the My::Crypt module.
I searched all over CPAN and google, and cant find anything about this module, I think it is just very old!

Does anyone know what the new revision of this module is?

here is the syntax it is being used in if it helps
sub read_cookie { my $cookie = $_[0]; use My::Crypt; my $crypt = My::Crypt->new( debug => 0 ); my $den_cookie = $crypt->decrypt($cookie, 'lock it down'); my ($user_name,$user_id,$date,$first_name,$last_name) = split /\|/ +,$den_cookie; return ($user_name,$user_id,$date,$first_name,$last_name); }

Replies are listed 'Best First'.
Re: unknown module My::Crypt
by agianni (Hermit) on Mar 28, 2007 at 20:47 UTC
    My guess would be that My::Crypt is a local sub-class of something like Crypt::Lite with which seems to share its interface to the extent your code reveals. So you likely need to find My::Crypt on your system and check what it's base classing off of.
    perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'
Re: unknown module My::Crypt
by Anonymous Monk on Mar 28, 2007 at 20:52 UTC
Re: unknown module My::Crypt
by Anno (Deacon) on Mar 28, 2007 at 20:47 UTC
    By its name My::Crypt I'd quess you're dealing with a custom module, not one from CPAN.

    Anno

      Wrong :)
        Are you saying you found My::Crypt on CPAN?

        Anno

Re: unknown module My::Crypt
by Khen1950fx (Canon) on Mar 28, 2007 at 23:09 UTC
    Interesting...agianni hit the nail on the head. My::Crypt has a version number of 0.82.05 and appears to be exactly like Crypt::Lite at version number 0.82.05.

    Anno was right, too. If you search for "My::Crypt" on CPAN, CPAN won't find it. Evidently, the author changed the name because the module didn't use strong encryption.

      THANKS EVERYONE!!! I installed Crypt::Lite, and changed all the references, and BAM it works!