You are here

function _openid_math_add in Drupal 7

Calls the add function from the available math library for OpenID.

3 calls to _openid_math_add()
openid_association in modules/openid/openid.module
Attempt to create a shared secret with the OpenID Provider.
_openid_dh_binary_to_long in modules/openid/openid.inc
_openid_test_endpoint_associate in modules/openid/tests/openid_test.module
OpenID endpoint; handle "associate" requests (see OpenID Authentication 2.0, section 8).

File

modules/openid/openid.inc, line 740
OpenID utility functions.

Code

function _openid_math_add($x, $y) {
  $library = _openid_get_math_library();
  switch ($library) {
    case 'gmp':
      return gmp_strval(gmp_add($x, $y));
    case 'bcmath':
      return bcadd($x, $y);
  }
}