mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-26 20:24:39 +01:00
- change license to the less restrictive MIT license (if people want to modify phpseclib and distribute binaries of it [whatever that means for PHP] without including the source code I don't care); two of the three PHP_Compat stuff still uses the LGPL since I didn't author them but they're only needed, anyway, if you're using phpseclib on PHP4.
- add svn:eol-style: LF to all files - fixed pear.php.net bug # 18037 (thanks, nounours!) git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@130 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
19cc43cc16
commit
b94a467999
@ -55,8 +55,8 @@
|
||||
* @package Crypt_AES
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVIII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: AES.php,v 1.10 2010-09-26 05:24:52 terrafrost Exp $
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: AES.php,v 1.7 2010/02/09 06:10:25 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
|
@ -52,8 +52,8 @@
|
||||
* @package Crypt_DES
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: DES.php,v 1.16 2010-09-26 05:24:52 terrafrost Exp $
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: DES.php,v 1.12 2010/02/09 06:10:26 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
|
@ -48,8 +48,8 @@
|
||||
* @package Crypt_Hash
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: Hash.php,v 1.8 2010-08-28 17:26:22 terrafrost Exp $
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: Hash.php,v 1.6 2009/11/23 23:37:07 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
|
@ -54,8 +54,8 @@
|
||||
* @package Crypt_RC4
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: RC4.php,v 1.9 2010-10-24 01:24:30 terrafrost Exp $
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: RC4.php,v 1.8 2009/06/09 04:00:38 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
@ -209,7 +209,6 @@ class Crypt_RC4 {
|
||||
$this->key = $key;
|
||||
|
||||
if ( CRYPT_RC4_MODE == CRYPT_RC4_MODE_MCRYPT ) {
|
||||
$this->encryptStream = $this->decryptStream = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -61,8 +61,8 @@
|
||||
* @package Crypt_RSA
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMIX Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: RSA.php,v 1.20 2010-09-26 03:10:20 terrafrost Exp $
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: RSA.php,v 1.19 2010/09/12 21:58:54 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
@ -1381,9 +1381,11 @@ class Crypt_RSA {
|
||||
*/
|
||||
function _blind($x, $r, $i)
|
||||
{
|
||||
echo "blinding\r\n";
|
||||
$x = $x->multiply($r->modPow($this->publicExponent, $this->primes[$i]));
|
||||
|
||||
echo "calling modpow\r\n";
|
||||
$x = $x->modPow($this->exponents[$i], $this->primes[$i]);
|
||||
echo "modpow called\r\n";
|
||||
|
||||
$r = $r->modInverse($this->primes[$i]);
|
||||
$x = $x->multiply($r);
|
||||
@ -1679,6 +1681,7 @@ class Crypt_RSA {
|
||||
|
||||
$c = $this->_os2ip($c);
|
||||
$m = $this->_rsadp($c);
|
||||
echo urlencode($m->toBytes()) . "\r\n";
|
||||
if ($m === false) {
|
||||
user_error('Decryption error', E_USER_NOTICE);
|
||||
return false;
|
||||
@ -2025,6 +2028,7 @@ class Crypt_RSA {
|
||||
case CRYPT_RSA_ENCRYPTION_PKCS1:
|
||||
$length = $this->k - 11;
|
||||
if ($length <= 0) {
|
||||
echo 'returning false';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@
|
||||
* @package Crypt_Random
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: Random.php,v 1.9 2010-04-24 06:40:48 terrafrost Exp $
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: Random.php,v 1.9 2010/04/24 06:40:48 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
|
@ -63,8 +63,8 @@
|
||||
* @package Crypt_Rijndael
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVIII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: Rijndael.php,v 1.15 2010-09-26 05:02:10 terrafrost Exp $
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: Rijndael.php,v 1.12 2010/02/09 06:10:26 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
@ -671,6 +671,8 @@ class Crypt_Rijndael {
|
||||
}
|
||||
break;
|
||||
case CRYPT_RIJNDAEL_MODE_CBC:
|
||||
echo "USING CBC\r\n";
|
||||
echo "mode = {$this->mode}\r\n";exit;
|
||||
$xor = $this->encryptIV;
|
||||
for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
|
||||
$block = substr($plaintext, $i, $block_size);
|
||||
|
@ -46,8 +46,8 @@
|
||||
* @package Crypt_TripleDES
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: TripleDES.php,v 1.17 2010-09-26 05:24:52 terrafrost Exp $
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: TripleDES.php,v 1.13 2010/02/26 03:40:25 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
* @package Math_BigInteger
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVI Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: BigInteger.php,v 1.33 2010/03/22 22:32:03 terrafrost Exp $
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
@ -599,7 +599,9 @@ class Math_BigInteger {
|
||||
for ($i = 0, $end = strlen($hex) & 0xFFFFFFF8; $i < $end; $i+=8) {
|
||||
$bits.= str_pad(decbin(hexdec(substr($hex, $i, 8))), 32, '0', STR_PAD_LEFT);
|
||||
}
|
||||
$bits.= str_pad(decbin(hexdec(substr($hex, $end))), strlen($hex) & 7, '0', STR_PAD_LEFT);
|
||||
if ($end != strlen($hex)) { // hexdec('') == 0
|
||||
$bits.= str_pad(decbin(hexdec(substr($hex, $end))), strlen($hex) & 7, '0', STR_PAD_LEFT);
|
||||
}
|
||||
return $this->precision > 0 ? substr($bits, -$this->precision) : ltrim($bits, '0');
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
* @package Net_SFTP
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMIX Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: SFTP.php,v 1.25 2010/10/02 22:23:25 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
@ -64,8 +64,8 @@
|
||||
* @package Net_SSH1
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: SSH1.php,v 1.16 2010-08-08 05:06:38 terrafrost Exp $
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: SSH1.php,v 1.15 2010/03/22 22:01:38 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
* @package Net_SSH2
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version $Id: SSH2.php,v 1.53 2010-10-24 01:24:30 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Id: array_fill.php,v 1.1 2007-07-02 04:19:55 terrafrost Exp $
|
||||
// $Id: array_fill.php,v 1.1 2007/07/02 04:19:55 terrafrost Exp $
|
||||
|
||||
|
||||
/**
|
||||
@ -7,7 +7,7 @@
|
||||
*
|
||||
* @category PHP
|
||||
* @package PHP_Compat
|
||||
* @license LGPL - http://www.gnu.org/licenses/lgpl.html
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @copyright 2004-2007 Aidan Lister <aidan@php.net>, Arpad Ray <arpad@php.net>
|
||||
* @link http://php.net/function.array_fill
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
|
Loading…
Reference in New Issue
Block a user