<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.4.9" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
-http://pear.php.net/dtd/tasks-1.0.xsd
-http://pear.php.net/dtd/package-2.0
-http://pear.php.net/dtd/package-2.0.xsd">
+<package packagerversion="1.9.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>Secret</name>
<channel>pear.horde.org</channel>
<summary>Secret Encryption API</summary>
- <description>The Horde_Secret:: package provides an API for encrypting and decrypting small pieces of data with the use of a shared key.
- </description>
+ <description>The Horde_Secret:: package provides an API for encrypting and decrypting small pieces of data with the use of a shared key.</description>
<lead>
<name>Chuck Hagenbuch</name>
<user>chuck</user>
<email>slusarz@horde.org</email>
<active>yes</active>
</lead>
- <date>2010-03-19</date>
+ <date>2010-11-17</date>
+ <time>16:28:13</time>
<version>
<release>0.1.0</release>
<api>0.1.0</api>
<api>beta</api>
</stability>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>* Remove dependency on Horde_Core.
+ <notes>
+* Remove dependency on Horde_Core.
* Throw exceptions on error.
* Convert to OO-interface.
- * Use PEAR's Crypt_Blowfish to encrypt data.
+ * Use PEAR's Crypt_Blowfish to encrypt data.
</notes>
<contents>
- <dir name="/">
+ <dir baseinstalldir="/" name="/">
<dir name="lib">
<dir name="Horde">
<dir name="Secret">
<file name="Secret.php" role="php" />
</dir> <!-- /lib/Horde -->
</dir> <!-- /lib -->
+ <dir name="test">
+ <dir name="Horde">
+ <dir name="Secret">
+ <dir name="Unit">
+ <file name="SecretTest.php" role="test" />
+ </dir> <!-- /test/Horde/Secret/Unit -->
+ <file name="AllTests.php" role="test" />
+ <file name="Autoload.php" role="test" />
+ <file name="phpunit.xml" role="test" />
+ </dir> <!-- /test/Horde/Secret -->
+ </dir> <!-- /test/Horde -->
+ </dir> <!-- /test -->
</dir> <!-- / -->
</contents>
<dependencies>
</dependencies>
<phprelease>
<filelist>
- <install name="lib/Horde/Secret/Exception.php" as="Horde/Secret/Exception.php" />
- <install name="lib/Horde/Secret.php" as="Horde/Secret.php" />
+ <install as="Horde/Secret.php" name="lib/Horde/Secret.php" />
+ <install as="Horde/Secret/Exception.php" name="lib/Horde/Secret/Exception.php" />
+ <install as="Horde/Secret/AllTests.php" name="test/Horde/Secret/AllTests.php" />
+ <install as="Horde/Secret/Autoload.php" name="test/Horde/Secret/Autoload.php" />
+ <install as="Horde/Secret/phpunit.xml" name="test/Horde/Secret/phpunit.xml" />
+ <install as="Horde/Secret/Unit/SecretTest.php" name="test/Horde/Secret/Unit/SecretTest.php" />
</filelist>
</phprelease>
<changelog>
<release>
- <date>2008-12-11</date>
<version>
- <release>0.0.3</release>
- <api>0.0.2</api>
+ <release>0.0.1</release>
+ <api>0.0.1</api>
</version>
<stability>
<release>alpha</release>
<api>alpha</api>
</stability>
+ <date>2003-07-05</date>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>* Initial Horde 4 package.</notes>
+ <notes>
+Initial release as a PEAR package
+ </notes>
</release>
<release>
<date>2006-05-08</date>
<api>alpha</api>
</stability>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>- Converted to package.xml 2.0 for pear.horde.org
+ <notes>
+- Converted to package.xml 2.0 for pear.horde.org
- Return false instead of generating encryption errors if $key is empty (Bug #5925).
</notes>
</release>
<release>
+ <date>2008-12-11</date>
<version>
- <release>0.0.1</release>
- <api>0.0.1</api>
+ <release>0.0.3</release>
+ <api>0.0.2</api>
</version>
<stability>
<release>alpha</release>
<api>alpha</api>
</stability>
- <date>2003-07-05</date>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>Initial release as a PEAR package
+ <notes>
+* Initial Horde 4 package.
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>0.1.0</release>
+ <api>0.1.0</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <date>2010-11-17</date>
+ <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
+ <notes>
+* Remove dependency on Horde_Core.
+ * Throw exceptions on error.
+ * Convert to OO-interface.
+ * Use PEAR's Crypt_Blowfish to encrypt data.
</notes>
</release>
</changelog>
/**
* All tests for the Horde_Secret package.
*
- * @category Horde
- * @package Secret
- * @author Michael Slusarz <slusarz@horde.org>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Secret
+ * PHP version 5
+ *
+ * @category Horde
+ * @package Secret
+ * @subpackage UnitTests
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Secret
*/
/**
/**
* Setup autoloading for the tests.
*
- * @category Horde
- * @package Secret
- * @author Michael Slusarz <slusarz@horde.org>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Secret
+ * PHP version 5
+ *
+ * @category Horde
+ * @package Secret
+ * @subpackage UnitTests
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Secret
*/
-if (!spl_autoload_functions()) {
- spl_autoload_register(
- create_function(
- '$class',
- '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class);'
- . '$err_mask = E_ALL ^ E_WARNING;'
- . '$oldErrorReporting = error_reporting($err_mask);'
- . 'include "$filename.php";'
- . 'error_reporting($oldErrorReporting);'
- )
- );
-}
+require_once 'Horde/Test/Autoload.php';
/** Catch strict standards */
error_reporting(E_ALL | E_STRICT);
/** Needed for PEAR_Error. */
-@require_once 'PEAR.php';
+require_once 'PEAR.php';
+++ /dev/null
-<?php
-/**
- * Test the secret class.
- *
- * @category Horde
- * @package Secret
- * @author Michael Slusarz <slusarz@horde.org>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Secret
- */
-
-/**
- * Prepare the test setup.
- */
-require_once dirname(__FILE__) . '/../Autoload.php';
-
-/**
- * Test the secret class.
- *
- * Copyright 2009-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Horde
- * @package Secret
- * @author Michael Slusarz <slusarz@horde.org>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Secret
- */
-
-class Horde_Secret_Class_SecretTest extends PHPUnit_Framework_TestCase
-{
- public function test8BitKey()
- {
- $secret = new Horde_Secret();
-
- $key = "\x88";
- $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
-
- $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
- }
-
- public function test64BitKey()
- {
- $secret = new Horde_Secret();
-
- $key = "\x00\x00\x00\x00\x00\x00\x00\x00";
- $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
-
- $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
- }
-
- public function test128BitKey()
- {
- $secret = new Horde_Secret();
-
- $key = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F";
- $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
-
- $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
- }
-
-}
--- /dev/null
+<?php
+/**
+ * Test the secret class.
+ *
+ * PHP version 5
+ *
+ * @category Horde
+ * @package Secret
+ * @subpackage UnitTests
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Secret
+ */
+
+/**
+ * Prepare the test setup.
+ */
+require_once dirname(__FILE__) . '/../Autoload.php';
+
+/**
+ * Test the secret class.
+ *
+ * Copyright 2009-2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category Horde
+ * @package Secret
+ * @subpackage UnitTests
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Secret
+ */
+
+class Horde_Secret_Unit_SecretTest extends PHPUnit_Framework_TestCase
+{
+ public function test8BitKey()
+ {
+ $secret = new Horde_Secret();
+
+ $key = "\x88";
+ $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
+
+ $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
+ }
+
+ public function test64BitKey()
+ {
+ $secret = new Horde_Secret();
+
+ $key = "\x00\x00\x00\x00\x00\x00\x00\x00";
+ $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
+
+ $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
+ }
+
+ public function test128BitKey()
+ {
+ $secret = new Horde_Secret();
+
+ $key = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F";
+ $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
+
+ $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
+ }
+
+}