Пример #1
0
 public function InitCodeCrypt($codeCrypt, $password = "")
 {
     if (!defined("CAPTCHA_COMPATIBILITY")) {
         return CCaptcha::InitCaptchaCode($codeCrypt);
     }
     if (strlen($codeCrypt) <= 0) {
         return False;
     }
     if (!array_key_exists("CAPTCHA_PASSWORD", $_SESSION) || strlen($_SESSION["CAPTCHA_PASSWORD"]) <= 0) {
         return False;
     }
     $this->codeCrypt = $codeCrypt;
     $this->code = $this->CryptData($codeCrypt, "D", $_SESSION["CAPTCHA_PASSWORD"]);
     $this->codeLength = strlen($this->code);
     return True;
 }