Browse files

Release prep

git-svn-id: http://svn.php.net/repository/pear/packages/Crypt_Rc4/trunk@304005 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 288adf5 commit 6e8823bcb98a270d98bcf68ab93a8de9b81b2b5e @CloCkWeRX CloCkWeRX committed Oct 4, 2010
Showing with 72 additions and 76 deletions.
  1. 0 { → Crypt}/Rc4.php
  2. +72 −27 package.xml
  3. +0 −49 tests/Rc4Test.php
View
0 Rc4.php → Crypt/Rc4.php
File renamed without changes.
View
99 package.xml
@@ -1,30 +1,75 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0">
-<!-- do not use the "Type" attribute here, that one is only for
- generated package.xml files -->
-<package version="1.0">
- <name>Crypt_RC4</name>
- <description>RC4 encryption class</description>
- <summary>Encryption class for RC4 encryption</summary>
- <maintainers>
- <maintainer>
- <user>zyprexia</user>
- <name>Dave Mertens</name>
- <email>zyprexia@php.net</email>
- </maintainer>
- </maintainers>
+<?xml version="1.0" encoding="UTF-8"?>
+<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>Crypt_RC4</name>
+ <channel>pear.php.net</channel>
+ <summary>Encryption class for RC4 encryption</summary>
+ <description>RC4 encryption class</description>
+ <lead>
+ <name>Dave Mertens</name>
+ <user>zyprexia</user>
+ <email>zyprexia@php.net</email>
+ <active>yes</active>
+ </lead>
+ <date>2010-10-04</date>
+ <time>23:40:40</time>
+ <version>
+ <release>1.0.3</release>
+ <api>1.0.2</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+Bugfix release: This version should prevent/solve the problems with the undefined index with some pear installers
+ </notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file baseinstalldir="/" md5sum="cf4f9a52035a73f5ec2326aa21c38ab2" name="Crypt/Rc4.php" role="php" />
+ </dir>
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>4.0.0</min>
+ </php>
+ <pearinstaller>
+ <min>1.4.0b1</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+ <phprelease />
+ <changelog>
<release>
- <version>1.0.2</version>
- <license>PHP</license>
- <state>stable</state>
- <date>2003-10-20</date>
- <notes>
- Bugfix release: This version should prevent/solve the problems with the undefined index with some pear installers
- </notes>
- <filelist>
- <dir name="/" baseinstalldir="Crypt">
- <file role="php">Rc4.php</file>
- </dir>
- </filelist>
+ <version>
+ <release>1.0.2</release>
+ <api>1.0.2</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2010-10-04</date>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+Bugfix release: This version should prevent/solve the problems with the undefined index with some pear installers
+ </notes>
</release>
+ <release>
+ <version>
+ <release>1.0.3</release>
+ <api>1.0.2</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2010-10-04</date>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+Bugfix release: This version should prevent/solve the problems with the undefined index with some pear installers
+ </notes>
+ </release>
+ </changelog>
</package>
View
49 tests/Rc4Test.php
@@ -1,49 +0,0 @@
-<?php
-
-require_once( "PHPUnit/Framework/TestCase.php" );
-require_once( "Crypt/Rc4.php");
-
-if (!defined("PHPUnit_MAIN_METHOD")) {
- define("PHPUnit_MAIN_METHOD", "Rc4Test::main");
-}
-
-//Unit test for PHP5 version of RC4
-class Rc4Test extends PHPUnit_Framework_TestCase {
- private $_key = "PEAR";
- private $_message = "PEAR Rulez!";
-
- public function testSimpleEncryption()
- {
- $rc4 = new Crypt_Rc4;
- $rc4->key($this->_key);
- $this->assertEquals('4kwQ6uYzPplnt0Q=', base64_encode($rc4->encrypt($this->_message)));
- }
-
- //Test simple decryption. Checking result
- public function testSimpleDecryption()
- {
- $rc4 = new Crypt_Rc4;
- $rc4->key($this->_key);
- $this->assertEquals('PEAR Rulez!', $rc4->decrypt(base64_decode('4kwQ6uYzPplnt0Q=')));
- }
-
- //Test encryption and than decryption of the encrypted string. The result must be the same as the message at the start
- //This test is based on the usage example in the Rc4 class. It also test fix for PHP issue #22316
- public function testRoundRobinEncryption()
- {
- $rc4 = new Crypt_Rc4;
- $rc4->key = $this->_key;
- $message = $rc4->encrypt($this->_message);
- $message = $rc4->decrypt($message);
- $this->assertEquals($this->_message, $message);
- }
-
- //test RC4 assigning key using the constructor
- public function testConstuctor()
- {
- $rc4 = new Crypt_Rc4($this->_key);
- $this->assertEquals('4kwQ6uYzPplnt0Q=', base64_encode($rc4->encrypt($this->_message)));
- }
-}
-
-?>

0 comments on commit 6e8823b

Please sign in to comment.