install/includes/libenanoinstall.php
changeset 1144 fcb2be1428e7
parent 1081 745200a9cc2a
child 1182 58af2268331b
--- a/install/includes/libenanoinstall.php	Tue Dec 01 00:27:26 2009 -0500
+++ b/install/includes/libenanoinstall.php	Tue Dec 01 00:35:04 2009 -0500
@@ -116,6 +116,25 @@
   exit;
 }
 
+function install_get_crypto_backend()
+{
+  $crypto_backend = 'none';
+
+  // Extension test: BCMath
+  if ( function_exists('bcadd') )
+    $crypto_backend = 'bcmath';
+  
+  // Extension test: Big_Int
+  if ( function_exists('bi_from_str') )
+    $crypto_backend = 'bigint';
+  
+  // Extension test: GMP
+  if ( function_exists('gmp_init') )
+    $crypto_backend = 'gmp';
+  
+  return $crypto_backend;
+}
+
 function enano_perform_upgrade($target_branch)
 {
   global $db, $session, $paths, $template, $plugins; // Common objects