From 315dec9dc5f42d905b83099d51f61a4292de7eb2 Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Mon, 7 Dec 2009 23:22:05 +0000 Subject: [PATCH] - loadKey returns false on failure and true on success (thanks, seriksen!) git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@68 21d32557-59b3-4da0-833f-c5933fad653e --- phpseclib/Crypt/RSA.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 0696a21d..9986c647 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -62,7 +62,7 @@ * @author Jim Wigginton * @copyright MMIX Jim Wigginton * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: RSA.php,v 1.4 2009-12-06 07:26:52 terrafrost Exp $ + * @version $Id: RSA.php,v 1.5 2009-12-07 23:22:05 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ @@ -846,6 +846,8 @@ class Crypt_RSA { /** * Loads a public or private key * + * Returns true on success and false on failure (ie. an incorrect password was provided or the key was malformed) + * * @access public * @param String $key * @param Integer $type optional @@ -871,6 +873,8 @@ class Crypt_RSA { $this->coefficients = array(); $this->publicExponent = false; } + + return true; } /**