Mario Kulka wrote:
> 
> I inserted the following line into my cgi script:
> use Digest::MD5  qw(md5 md5_hex md5_base64);
> 
> and it generates error; but if type:
> 
> use MD5;
> 
> it works fine. Can someone pls explain?

>From the MD5 manpage:

perldoc MD5
[snip]
       The `MD5' module is depreciated.  Use `Digest::MD5'
       instead.

       The current `MD5' module is just a wrapper around the
       `Digest::MD5' module.  It is provided so that legacy code
       that rely on the old interface still work and get the
       speed benefit of the new module.

If you don't have Digest::MD5 then you probably have an older
distribution.


> By the way, I read on perldoc.com that
> 
> md5($data,...)
> This function will concatenate all arguments, calculate the MD5 digest of
> this "message", and return it in binary form.
> md5_hex($data,...)
> Same as md5(), but will return the digest in hexadecimal form.
> md5_base64($data,...)
> Same as md5(), but will return the digest as a base64 encoded string.
> 
> Could someone put it in plain english binary vs hexadecimal vs base64
> encoded?

Binary means that each character in a string can be any eight bit value
(0-255).  Hexadecimal is when you convert one binary character to two
hexadecimal characters.  Base64 IIRC is when you convert three binary
characters to four base64 characters.  Base64 (and uuencode) were
created to transmit eight bit data over a seven bit protocol (like
email.)



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to