mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-27 17:18:25 +00:00
RSA: misc fixes to select plugins
This commit is contained in:
parent
6eb5ea3ef7
commit
e2fcd9d951
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* BLOB Formatted RSA Key Handler
|
* Miccrosoft BLOB Formatted RSA Key Handler
|
||||||
*
|
*
|
||||||
* More info:
|
* More info:
|
||||||
*
|
*
|
||||||
@ -21,13 +21,13 @@ namespace phpseclib\Crypt\RSA;
|
|||||||
use phpseclib\Math\BigInteger;
|
use phpseclib\Math\BigInteger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BLOB Formatted RSA Key Handler
|
* Microsoft BLOB Formatted RSA Key Handler
|
||||||
*
|
*
|
||||||
* @package RSA
|
* @package RSA
|
||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
class BLOB
|
class MSBLOB
|
||||||
{
|
{
|
||||||
/**#@+
|
/**#@+
|
||||||
* @access private
|
* @access private
|
@ -19,7 +19,7 @@ namespace phpseclib\Crypt\RSA;
|
|||||||
use phpseclib\Math\BigInteger;
|
use phpseclib\Math\BigInteger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XML Formatted RSA Key Handler
|
* OpenSSH Formatted RSA Key Handler
|
||||||
*
|
*
|
||||||
* @package RSA
|
* @package RSA
|
||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
@ -41,9 +41,9 @@ class OpenSSH
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $comment
|
* @param string $comment
|
||||||
*/
|
*/
|
||||||
static function setEncryptionAlgorithm($comment)
|
static function setComment($comment)
|
||||||
{
|
{
|
||||||
self::$comment = $comment;
|
self::$comment = str_replace(array("\r", "\n"), '', $comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,9 +41,9 @@ class PuTTY
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $comment
|
* @param string $comment
|
||||||
*/
|
*/
|
||||||
static function setEncryptionAlgorithm($comment)
|
static function setComment($comment)
|
||||||
{
|
{
|
||||||
self::$comment = $comment;
|
self::$comment = str_replace(array("\r", "\n"), '', $comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -431,7 +431,7 @@ Private-MAC: 35134b7434bf828b21404099861d455e660e8740';
|
|||||||
$this->assertGreaterThanOrEqual(1, strlen("$privKey"));
|
$this->assertGreaterThanOrEqual(1, strlen("$privKey"));
|
||||||
|
|
||||||
$pubKey = new RSA();
|
$pubKey = new RSA();
|
||||||
$pubKey->load($privKey->getPublicKey('blob'));
|
$pubKey->load($privKey->getPublicKey('msblob'));
|
||||||
|
|
||||||
$this->assertGreaterThanOrEqual(1, strlen("$pubKey"));
|
$this->assertGreaterThanOrEqual(1, strlen("$pubKey"));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user