Difference between revisions of "Pccipher"
(→TODO) |
|||
Line 92: | Line 92: | ||
* Use the 'pccipher' namespace for phpjs | * Use the 'pccipher' namespace for phpjs | ||
* Integrate with PHP mcrypt? | * Integrate with PHP mcrypt? | ||
+ | * Compatible implementations in other languages | ||
+ | * Twofish? | ||
[[Category:TODO]] | [[Category:TODO]] |
Revision as of 03:35, 17 August 2011
Pccipher is the ProgClub encryption software. That's the software that allows you to encrypt and decrypt data in PHP and Javascript. It's compatible with 32-bit and 64-bit implementations of PHP, and should work in any Javascript capable web-browser. For other projects see Projects.
Project status
Released! But there's still stuff TODO.
Contributors
Members who have contributed to this project. Newest on top.
Upstream contributors for the phpjs library used by pccipher/js.
Upstream contributors for the jQuery library used by pccipher/js.
- John Resig, http://jquery.com/
Upstream contributors for the QUnit library used by pccipher/js.
Upstream contributors for the SimpleTest library used by pccipher/php.
Copyright
Copyright 2011, Contributors. Dual licensed under the MIT or GPL licenses.
Pccipher uses the phpjs library which is dual licensed under the MIT or GPL licenses.
Pccipher uses the jQuery library which is dual licensed under the MIT or GPL licenses.
Pccipher uses the QUnit library which is dual licensed under the MIT or GPL licenses.
Pccipher uses the SimpleTest library which is licensed under the LGPL.
Download
You can download the latest version of pccipher from the following URL:
http://www.progclub.org/download/pccipher/pccipher-latest.tar.gz
You can look in the download directory for specific releases.
Source code
The code for pccipher is publicly available from svn:
http://www.progclub.org/svnro/pcrepo/pccipher/tags/latest
Or privately available for read-write access:
https://www.progclub.org/svn/pcrepo/pccipher/trunk
The repository can be browsed online:
http://www.progclub.org/pcrepo/pccipher
Links
TODO
Things to do, in rough order of priority:
- Use the 'pccipher' namespace for phpjs
- Integrate with PHP mcrypt?
- Compatible implementations in other languages
- Twofish?
Done
Stuff that's done. Latest stuff on top.
- JE 2011-08-16: packaged in .tar.gz download files
- JE 2011-08-16: documented usage process for Javascript and PHP
- JE 2011-08-16: integrated SimpleTest testing framework for PHP
- JE 2011-08-16: integrated QUnit testing framework for Javascript
- JE 2011-08-16: fixed formatting to use \x02 .. \x03 wrapper
- JE 2011-08-16: removed key crc, and added algorithm code
- JE 2011-08-16: copied in existing code (support for Blowfish on PHP and Javascript)
- JE 2011-08-16: created the project in svn
- JE 2011-08-16: created project page
Tests
Javascript
You can run the Javascript tests for the latest stable release at:
http://www.progclub.org/pccipher/js/test/test.html
And the latest development snapshot (i.e. trunk) at:
http://www.progclub.org/pccipher-dev/js/test/test.html
PHP
You can run the PHP unit tests for the latest stable release at:
http://www.progclub.org/pccipher/php/test/pccipher_test.php
And the latest development snapshot (i.e. trunk) at:
http://www.progclub.org/pccipher-dev/php/test/pccipher_test.php
Notes for implementers
If you are interested in incorporating the ProgClub pccipher into your project, here's what you need to know:
For Javascript
An example Javascript implementation:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://www.progclub.org/pccipher/js/lib/phpjs/phpjs.js"></script> <script type="text/javascript" src="http://www.progclub.org/pccipher/js/src/pccipher.js"></script> <script type="text/javascript"> $(document).ready(function(){ var key = "my key"; var text = "my text"; var data = pccipher_encrypt( text, key ); alert( data ); }); </script> </head> <body> <h1>Pccipher example</h1> </body> </html>
For PHP
You probably want to setup an svn:externals to:
http://www.progclub.org/svnro/pcrepo/pccipher/tags/latest
Then you can use the PHP library with something like this:
<?php error_reporting( E_ALL ); ini_set( 'display_errors', 'On' ); require_once( dirname( __FILE__ ) . '/path/to/pccipher/php/src/pccipher_auto.php' ); $key = "my key"; $text = "my text"; $data = pccipher_encrypt( $text, $key ); $text = pccipher_decrypt( $data, $key ); echo "<p>" . $text . "</p>"; ?>