Skip to content

Commit 04e7956

Browse files
author
tailor
committed
[project @ Added documentation to DiffieHellman.]
1 parent 04ad820 commit 04e7956

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

Net/OpenID/DiffieHellman.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
<?php
22

3+
/**
4+
* The OpenID library's Diffie-Hellman implementation.
5+
*
6+
* PHP versions 4 and 5
7+
*
8+
* LICENSE: See the COPYING file included in this distribution.
9+
*
10+
* @package OpenID
11+
* @author JanRain, Inc. <[email protected]>
12+
* @copyright 2005 Janrain, Inc.
13+
* @license http://www.gnu.org/copyleft/lesser.html LGPL
14+
*/
15+
16+
/**
17+
* Check to see if GMP or Bcmath are available and supply the
18+
* appropriate implementation.
19+
*/
320
if (extension_loaded('gmp') || @dl('gmp.' . PHP_SHLIB_SUFFIX) ||
421
@dl('php_gmp.' . PHP_SHLIB_SUFFIX)) {
522

623
define('Net_OpenID_math_type', 'gmp');
724

8-
// XXX: untested!
25+
/**
26+
* The Diffie-Hellman key exchange class.
27+
*
28+
* @package OpenID
29+
*/
930
class Net_OpenID_DiffieHellman {
1031
var $DEFAULT_MOD = '155172898181473697471232257763715539915724801966915404479707795314057629378541917580651227423698188993727816152646631438561595825688188889951272158842675419950341258706556549803580104870537681476726513255747040765857479291291572334510643245094715007229621094194349783925984760375594985848253359305585439638443';
1132

@@ -55,6 +76,9 @@ function decryptKeyExchange( $keyEx ) {
5576
} elseif (extension_loaded('bcmath') || @dl('bcmath.' . PHP_SHLIB_SUFFIX) ||
5677
@dl('php_bcmath.' . PHP_SHLIB_SUFFIX)) {
5778

79+
/**
80+
* @ignore
81+
*/
5882
define('Net_OpenID_math_type', 'bcmath');
5983

6084
if (!function_exists('bcpowmod')) {
@@ -77,6 +101,10 @@ function bcpowmod($base, $exponent, $modulus) {
77101
}
78102
}
79103

104+
/**
105+
* @ignore
106+
* @package OpenID
107+
*/
80108
class Net_OpenID_DiffieHellman {
81109
var $DEFAULT_MOD = '155172898181473697471232257763715539915724801966915404479707795314057629378541917580651227423698188993727816152646631438561595825688188889951272158842675419950341258706556549803580104870537681476726513255747040765857479291291572334510643245094715007229621094194349783925984760375594985848253359305585439638443';
82110

0 commit comments

Comments
 (0)