includes/functions.php
changeset 1183 15957df91ea4
parent 1167 3c73e1b6d33f
child 1198 3ec9ac297045
equal deleted inserted replaced
1182:58af2268331b 1183:15957df91ea4
  5280       return true;
  5280       return true;
  5281     }
  5281     }
  5282   }
  5282   }
  5283 }
  5283 }
  5284 
  5284 
       
  5285 /**
       
  5286  * Get the appropriate crypto backend for this server
       
  5287  * @return string
       
  5288  */
       
  5289 
       
  5290 function install_get_crypto_backend()
       
  5291 {
       
  5292   $crypto_backend = 'none';
       
  5293 
       
  5294   // Extension test: BCMath
       
  5295   if ( function_exists('bcadd') )
       
  5296     $crypto_backend = 'bcmath';
       
  5297   
       
  5298   // Extension test: Big_Int
       
  5299   if ( function_exists('bi_from_str') )
       
  5300     $crypto_backend = 'bigint';
       
  5301   
       
  5302   // Extension test: GMP
       
  5303   if ( function_exists('gmp_init') )
       
  5304     $crypto_backend = 'gmp';
       
  5305   
       
  5306   return $crypto_backend;
       
  5307 }
       
  5308