public function getPrivateKey()
{
if ($this->_privateKey === null) {
$fileName = $this->generatePrivateKeyFile();
$content = file_get_contents($fileName);
$matches = array();
if (preg_match("/privateKey='(.*?)'/ms", $content, $matches) > 0) {
$this->_privateKey = $matches[1];
} else {
throw new TConfigurationException('captcha_privatekey_unknown');
}
}
return $this->_privateKey;
}