<?php require_once EMBASE_PATH_EYOU_TOOLMAIL_CONF . 'conf_global.php'; print_r(em_config::get('auth_lock'));
for ($i = 1, $c = $pkey_pair_num; $i <= $c; $i++) { $cert->create_private(); $pub_key = $cert->get_pubkey(); $priv_key = $cert->get_privkey(); printf("+Ok, Set up %d key pair succ!\r", $i); } echo "\n"; echo microtime(true)-$t; echo "\n"; */ $t = 0; for ($i = 1, $c = $pkey_pair_num; $i <= $c; $i++) { $t1 = microtime(true); $cert->create_private(); $cert->free(); $t2 = microtime(true); $t += $t2 - $t1; printf("%d\r", $i); } echo $t / $pkey_pair_num . "\n"; $config = em_config::get2('openssl_config'); $t = 0; for ($i = 1, $c = $pkey_pair_num; $i <= $c; $i++) { $t1 = microtime(true); $res = openssl_pkey_new($config); openssl_pkey_free($res); $t2 = microtime(true); $t += $t2 - $t1; printf("%d\r", $i); } echo $t / $pkey_pair_num . "\n";
protected function getConnection() { if ($this->__debug) { echo __METHOD__ . "\n"; } if (!isset(self::$__is_init)) { $app = new Yaf_Application(PATH_RHEA_ETC . "application.ini", 'rhea'); $app->bootstrap(); self::$__is_init = true; } if (!self::$__conn) { require_once PATH_RHEA_LIB . 'em_db.class.php'; $db = em_db::singleton(); $pdo = $db->get_connection(); self::$__conn = $this->createDefaultDBConnection($pdo, em_config::get('db_name')); } return self::$__conn; }