diff options
author | tailor <cygnus@janrain.com> | 2006-01-05 00:10:18 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-01-05 00:10:18 +0000 |
commit | 9b90647fcbc7263cc1cd837cc143ed4b3b05b3e9 (patch) | |
tree | 84c1e5a36b1728e16b168af71c58f70601d770d6 | |
parent | 0767526fa4d11fbf091782719471ce778d5bd769 (diff) | |
download | php-openid-9b90647fcbc7263cc1cd837cc143ed4b3b05b3e9.zip php-openid-9b90647fcbc7263cc1cd837cc143ed4b3b05b3e9.tar.gz php-openid-9b90647fcbc7263cc1cd837cc143ed4b3b05b3e9.tar.bz2 |
[project @ Fixed brace style]
-rw-r--r-- | Net/OpenID/DiffieHellman.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Net/OpenID/DiffieHellman.php b/Net/OpenID/DiffieHellman.php index a545c23..d5d0609 100644 --- a/Net/OpenID/DiffieHellman.php +++ b/Net/OpenID/DiffieHellman.php @@ -41,7 +41,8 @@ class Net_OpenID_DiffieHellman { var $lib = null; function Net_OpenID_DiffieHellman($mod = NULL, $gen = NULL, - $private = NULL) { + $private = NULL) + { $this->lib =& Net_OpenID_MathLibrary::getLibWrapper(); @@ -80,23 +81,28 @@ class Net_OpenID_DiffieHellman { $this->mod); } - function generateRandom() { + function generateRandom() + { return $this->lib->random(1, $this->mod); } - function createKeyExchange() { + function createKeyExchange() + { return $this->lib->powmod($this->g, $this->x, $this->p); } - function decryptKeyExchange($keyEx) { + function decryptKeyExchange($keyEx) + { return $this->lib->powmod($keyEx, $this->x, $this->p); } - function getSharedSecret($composite) { + function getSharedSecret($composite) + { return $this->lib->powmod($composite, $this->private, $this->mod); } - function getPublicKey() { + function getPublicKey() + { return $this->public; } } |