Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.2.6

Bug #16214 BTWOC type support for getPrime()
Submitted: 2009-05-11 00:37 UTC Modified: 2009-05-30 02:50 UTC
From: shupp Assigned: shupp
Status: Closed Package: Crypt_DiffieHellman (version 0.2.1)
PHP Version: Irrelevant OS: OS X
Roadmaps: (Not assigned)    
Subscription  



Patch add-btwoc-for-getPrime Revisions
Revision 2009-05-11 00:38 UTC
Developer shupp
 
Download patch

--- DiffieHellman.php.orig	2009-01-19 15:49:39.000000000 -0800
+++ DiffieHellman.php	2009-05-10 16:32:44.000000000 -0700
@@ -307,6 +307,8 @@
         }
         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);
     }