cvs: pear /Crypt_CBC CBC.php package.xml
| From: | Colin Viebrock | Date: | Thu, 09 May 2002 18:34:32 +0000 |
| Subject: | cvs: pear /Crypt_CBC CBC.php package.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3732@lists.php.net to get a copy of this message | ||
cmv Thu May 9 14:34:32 2002 EDT
Modified files:
/pear/Crypt_CBC CBC.php package.xml
Log:
Index: pear/Crypt_CBC/CBC.php
diff -u pear/Crypt_CBC/CBC.php:1.1 pear/Crypt_CBC/CBC.php:1.2
--- pear/Crypt_CBC/CBC.php:1.1 Thu Apr 25 10:50:06 2002
+++ pear/Crypt_CBC/CBC.php Thu May 9 14:34:32 2002
@@ -16,7 +16,7 @@
// | Authors: Colin Viebrock <colin@easydns.com> |
// +----------------------------------------------------------------------+
//
-// $Id: CBC.php,v 1.1 2002/04/25 14:50:06 cmv Exp $
+// $Id: CBC.php,v 1.2 2002/05/09 18:34:32 cmv Exp $
//
require_once 'PEAR.php';
@@ -42,7 +42,7 @@
* the author of libcrypt decides to name things internally.
*
*
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
* @author Colin Viebrock <colin@easydns.com>
* @access public
* @package Crypt
@@ -136,11 +136,12 @@
return $this->raiseError('mcrypt module is not compiled into PHP', null,
PEAR_ERROR_DIE, null, 'compile PHP using "--with-mcrypt"' );
}
- if (!function_exists('mcrypt_module_open')) {
- return $this->raiseError('libmcrypt is 2.2.x', null,
- PEAR_ERROR_DIE, null, 'this class only works with libmcrypt 2.4.x and
later' );
+ if (!function_exists('mcrypt_module_open') ||
!function_exists('mcrypt_generic_deinit')) {
+ return $this->raiseError('libmcrypt/PHP version insufficient', null,
+ PEAR_ERROR_DIE, null, 'this class only works with libmcrypt >= 2.4.x and
later, and PHP >= 4.1.1' );
}
+
/* seed randomizer */
srand ((double)microtime()*1000000);
@@ -237,6 +238,7 @@
$cblock = mcrypt_generic($this->TD, $iv^$block );
$iv = $cblock;
$crypt .= $cblock;
+ mcrypt_generic_deinit($this->TD);
}
$this->last_crypt = $crypt;
@@ -285,6 +287,7 @@
$block = $iv ^ mdecrypt_generic($this->TD, $cblock);
$iv = $cblock;
$clear .= $block;
+ mcrypt_generic_deinit($this->TD);
}
/* remove the padding from the end of the cleartext */
Index: pear/Crypt_CBC/package.xml
diff -u pear/Crypt_CBC/package.xml:1.2 pear/Crypt_CBC/package.xml:1.3
--- pear/Crypt_CBC/package.xml:1.2 Thu Apr 25 10:53:17 2002
+++ pear/Crypt_CBC/package.xml Thu May 9 14:34:32 2002
@@ -4,7 +4,12 @@
generated package.xml files -->
<package version="1.0">
<name>Crypt_CBC</name>
- <summary>The PEAR::Crypt_CBC class to emulate Perl's Crypt::CBC module</summary>
+ <summary>
+ A class to emulate Perl's Crypt::CBC module.
+ </summary>
+ <description>
+ A class to emulate Perl's Crypt::CBC module.
+ </description>
<maintainers>
<maintainer>
<user>cmv</user>
@@ -14,6 +19,8 @@
</maintainers>
<release>
<version>0.1</version>
+ <state>stable</state>
+ <license>PHP 2.02</license>
<date>2002-04-25</date>
<notes>
This is the initial independent release of the Crypt_CBC package.