summaryrefslogtreecommitdiffstats
path: root/Net
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2006-01-13 21:36:59 +0000
committerJosh Hoyt <josh@janrain.com>2006-01-13 21:36:59 +0000
commit713d80ab3ad6c329aca031a54fa40b957d6c185f (patch)
tree70480191399641ebdddd1a9abb202abb7f03576b /Net
parent5380659d091678c2ac89c2da0221c80a88204cc6 (diff)
downloadphp-openid-713d80ab3ad6c329aca031a54fa40b957d6c185f.zip
php-openid-713d80ab3ad6c329aca031a54fa40b957d6c185f.tar.gz
php-openid-713d80ab3ad6c329aca031a54fa40b957d6c185f.tar.bz2
[project @ Clean up unused stuff in DiffieHellman]
Diffstat (limited to 'Net')
-rw-r--r--Net/OpenID/DiffieHellman.php17
1 files changed, 1 insertions, 16 deletions
diff --git a/Net/OpenID/DiffieHellman.php b/Net/OpenID/DiffieHellman.php
index 3eab483..b44769f 100644
--- a/Net/OpenID/DiffieHellman.php
+++ b/Net/OpenID/DiffieHellman.php
@@ -83,27 +83,12 @@ class Net_OpenID_DiffieHellman {
}
$this->private =
- ($private === null) ? $this->generateRandom() : $private;
+ ($private === null) ? $this->lib->random(1, $this->mod) : $private;
$this->public = $this->lib->powmod($this->gen, $this->private,
$this->mod);
}
- function generateRandom()
- {
- return $this->lib->random(1, $this->mod);
- }
-
- function createKeyExchange()
- {
- return $this->lib->powmod($this->g, $this->x, $this->p);
- }
-
- function decryptKeyExchange($keyEx)
- {
- return $this->lib->powmod($keyEx, $this->x, $this->p);
- }
-
function getSharedSecret($composite)
{
return $this->lib->powmod($composite, $this->private, $this->mod);