in reply to Crypted password under Win32

The answer is a resounding YES! However your question is a bit sketchy. (<-- word of the day!)

The best (IMHO) is Digest::MD5. This mod allows for both encryption and decryption, (good tip: run md5 twice). For information on loading perl modules on windows check here.

Hope that helps, also as far as the difference (between *nix and Windows) in handling encryption is little (if any) as long as you use modules (like MD5). If you try to use system resources such as rand or crypt then you begin to find more changes. MD5 on windows or *nix is the same (AFAIK).


- foogod

Replies are listed 'Best First'.
Re: Re: Crypted password under Win32
by HamNRye (Monk) on Jul 10, 2001 at 22:17 UTC

    More on the crypt:

    From "readme.win32"

    <snippet>

    If you have either the source or a library that contains des_fcrypt(), enable the appropriate option in the makefile. des_fcrypt() is not bundled with the distribution due to US Government restrictions on the export of cryptographic software. Nevertheless, this routine is part of the ``libdes'' library (written by Eric Young) which is widely available worldwide, usually along with SSLeay (for example: ``ftp://fractal.mta.ca/pub/crypto/SSLeay/DES/''). Set CRYPT_SRC to the name of the file that implements des_fcrypt(). Alternatively, if you have built a library that contains des_fcrypt(), you can set CRYPT_LIB to point to the library name. The location above contains many versions of the ``libdes'' library, all with slightly different implementations of des_fcrypt(). Older versions have a single, self-contained file (fcrypt.c) that implements crypt(), so they may be easier to use. A patch against the fcrypt.c found in libdes-3.06 is in des_fcrypt.patch.

    Perl will also build without des_fcrypt(), but the crypt() builtin will fail at run time.

    </snippet>

    So, if recompiling your perl is an option, here's another solution. Not that this all makes sense to me....

    ~Hammy

      That information is old. Modern versions of Perl from ActiveState and InigoStar come with working crypt that does exactly the same as the crypt of Unix Perls.

              - tye (but my friends call me "Tye")

        Excuse me, I was just going on the documentation from active perl. I installed ActivePerl-5.6.1.626 not too long ago (May 9) and there is no mention of this.

        For that frikkin' matter, I just tried a "crypt()" call and it fails. While this information is old, it is by no means outdated. If my 2 month old version of Perl won't work, chances are good that this information applies to the question asked.

        BTW, this is the first time I've gotten crap for R'ing TFM!

        I'm not saying you're not right, but I don't expect to get depricated for relaying information that is in relatively current documentation.

        ~Hammy