At 10:01 AM 5/3/00 +0100, [EMAIL PROTECTED] wrote:
>On Tue, 2 May 2000 11:47:16 -0700 [EMAIL PROTECTED] wrote:
>
> > An interesting question. VMS Perl's crypt employs an algorithm that
> > is compatible with the one used by AUTHORIZE and is internally consistent
> > but not necessarily consistent with other crypt() implementations.
>
>That makes sense. I assume that the intention was to provide an interface
>similar to $HASH_PASSWORD from Perl? If I were writing code just to
>interact with OpenVMS passwords I'd appreciate the decision :)
The bigger reason was likely one of ease--we have $HASH_PASSWORD, while
we'd need to write code to do Unix-style crypt(). (There was, for a while
at least, some controversy over the exportability of code with crypt in
it, at least from the US, but I don't think that was as big a reason)
>What would be involved in providing a Unix-compatible crypt() function?
Snagging the source for crypt and making it available to perl. You could do
it entirely in perl, I'm sure, or use an XS interface to an existing C
crypt implementation. Which would be better depends on whether you have
source and how many crypts you need per second.
Personally I'd snag the source for the Crack package, rip out the crypt
code (license permitting), and use that. Probably less than a day's work,
likely all of two or three hours, honestly.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk