note 47886 modified in function.md5 by aidan

From: Date: Sun, 05 Dec 2004 15:44:39 +0000
Subject: note 47886 modified in function.md5 by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81410@lists.php.net to get a copy of this message
If you want to replicate CPAN Digest::MD5's function md5_base64 in PHP, use this code: <?php function md5_base64 ( $data ) { return preg_replace('/=+$/','',base64_encode(pack('H*',md5($data)))); } ?> --was-- If you want to replicate CPAN Crypt::MD5's function md5_base64 in PHP, use this code: <?php function md5_base64 ( $data ) { return preg_replace('/=+$/','',base64_encode(pack('H*',md5($data)))); } ?> http://php.net/manual/en/function.md5.php

« previous php.notes (#81410) next »