[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-cvs
Subject:    [PEAR-CVS] cvs: pear /Crypt_DiffieHellman DiffieHellman.php
From:       "Daniel O'Connor" <clockwerx () php ! net>
Date:       2009-05-24 14:36:04
Message-ID: cvsclockwerx1243175764 () cvsserver
[Download RAW message or body]

clockwerx		Sun May 24 14:36:04 2009 UTC

  Modified files:              
    /pear/Crypt_DiffieHellman	DiffieHellman.php 
  Log:
  Bug #16214 - BTWOC type support for getPrime(). QA fix.
  
http://cvs.php.net/viewvc.cgi/pear/Crypt_DiffieHellman/DiffieHellman.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/Crypt_DiffieHellman/DiffieHellman.php
diff -u pear/Crypt_DiffieHellman/DiffieHellman.php:1.1 pear/Crypt_DiffieHellman/DiffieHellman.php:1.2
--- pear/Crypt_DiffieHellman/DiffieHellman.php:1.1	Sat Sep 15 20:13:09 2007
+++ pear/Crypt_DiffieHellman/DiffieHellman.php	Sun May 24 14:36:04 2009
@@ -40,7 +40,7 @@
  * @package     Crypt_DiffieHellman
  * @author      Pádraic Brady <padraic.brady@yahoo.com>
  * @license     http://opensource.org/licenses/bsd-license.php New BSD License
- * @version     $Id: DiffieHellman.php,v 1.1 2007/09/15 20:13:09 padraic Exp $
+ * @version     $Id: DiffieHellman.php,v 1.2 2009/05/24 14:36:04 clockwerx Exp $
  * @link        http://
  */
 
@@ -305,9 +305,13 @@
             require_once('Crypt/DiffieHellman/Exception.php');
             throw new Crypt_DiffieHellman_Exception('No prime number has been set');
         }
+
         if ($type == self::NUMBER) {
             return $this->_prime;
+        } else if ($type == self::BTWOC) {
+            return $this->_math->btwoc($this->_math->toBinary($this->_prime));
         }
+
         return $this->_math->toBinary($this->_prime);
     }
 
@@ -414,4 +418,4 @@
         return $rand;
     }
 
-}
\ No newline at end of file
+}



-- 
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic