Home: Perl Programming Help: Advanced:
MD5 without Perl Module?



funmeister
Deleted

Mar 16, 2001, 8:37 PM


Views: 8705
MD5 without Perl Module?

Hi all,

I need to use MD5 for my user authentication, but my web host doesn't allow additional Perl modules (outside of the standard they have like DBI). Since getting a new web host is not an option, can you please suggest a way to use MD5 in my Perl scripts without using a Perl module?

Thanks so much.

F.M.



rjoseph
Novice

May 5, 2001, 6:29 PM


Views: 8684
Re: MD5 without Perl Module?

Well, I hate to say it, but if your good at math and following abstract concepts:

http://www.cis.ohio-state.edu/Services/rfc/rfc-text/rfc1321.txt

That is the RFC for the MD5 algorithim - it is all everything you need to know to write an algorithim in your code that could implement MD5 - of course, it is going to be a major pain in the arse, but it sounds like that is your only option - good luck!

r j o s e p h
"Violence is a last resort of the incompetent" - Foundation


funmeister
Deleted

May 6, 2001, 6:20 AM


Views: 8682
Re: MD5 without Perl Module?

Yeah, I reckoned that would have to be the case. Anyways, thanks.

BTW, 'love the Salvor Hardin quote... you oughtta include the others like "it's a lousy blaster that cannot shoot both ways..." etc. :)



rjoseph
Novice

May 6, 2001, 11:57 AM


Views: 8677
Re: MD5 without Perl Module?

Glad I could be of atleast a little help Smile.

Yeah, my original sig has another quote (and is attributed to Hardin, but I figured that - like you - people who would really appreciate the quote would already know where it is from), but this forum limits sigs to 100 characters - oh well!

Anyway, good luck!

r j o s e p h
"Violence is a last resort of the incompetent" - Foundation


Jonas
Deleted

May 17, 2001, 1:39 AM


Views: 8668
Re: MD5 without Perl Module?

what about using the code of the module outside of the module?
it's only an idea
Jonas



Mortimer
journeyman

May 17, 2001, 5:19 PM


Views: 8659
Re: MD5 without Perl Module?

Couldn't you just...

Code
use lib 'path/to/your_modules/lib';

Dave.



funmeister
Deleted

May 17, 2001, 5:28 PM


Views: 8657
Re: MD5 without Perl Module?

Yup, tried that one... unfortunately there were lots of errors...

Er, have you tried doing this yourself on a virtually hosted account? Did it work, or is the problem just on my side...?

Thanks!



funmeister
Deleted

May 17, 2001, 5:31 PM


Views: 8656
Re: MD5 without Perl Module?

That's a terrific idea!

Actually, I haven't tried anything like this yet since I've lazily tried to look for an easier way out... but will do so... thanks!





Mortimer
journeyman

May 18, 2001, 4:07 AM


Views: 8644
Re: MD5 without Perl Module?

I do use a couple of modules that I wrote myself on my site but nothing as complicated as MD5. It's not a virtual site. But in my experience, you can do the same on a virtual site that you can do on a normal site. I don't see any reason why you can't have your MD5 module in your own lib directory, although I can imagine it could be a bit messy setting it up. If you do set it up, I'de be very grateful if you'de let me know. And if I'm wrong about this, someone please let me know.

Sorry I couldn't be more helpful.

Cheers,
Dave.



rjoseph
Novice

May 22, 2001, 10:55 PM


Views: 8623
Re: MD5 without Perl Module?

Actually, this is a good point. You could just put the MD5 module in your home directory, and then change the @INC array to include that directory as well. MAKE SURE the change is made at compile time (in a BEGIN block) because use calles are made then:

BEGIN { push @INC, '/home/users/me/MD5/'; }

That should - but then again, its late and I'm tired Smile. Good luck!

r j o s e p h
"Violence is a last resort of the incompetent" - Foundation


Jasmine
Administrator / Moderator

May 23, 2001, 10:59 AM


Views: 8620
Re: MD5 without Perl Module?

There are quite a few modules that can't just be dropped into a directory or locally installed and work properly. These modules need to be installed by someone with root access, particulary if files need to be compiled by programs restricted for use by root or it needs to edit/update other root files.

If memory serves, one of the errors that show when root installation is needed is "can't find loadable object".