original_string: protected function _validatePost(Controller $controller)
      {
          $token = $this->_validToken($controller);
          $hashParts = $this->_hashParts($controller);
          $check = hash_hmac('sha1', implode('', $hashParts), Security::getSalt());
  
          if (hash_equals($check, $token)) {
              return true;
          }
  
          $msg = self::DEFAULT_EXCEPTION_MESSAGE;
          if (Configure::read('debug')) {
              $msg = $this->_debugPostTokenNotMatching($controller, $hashParts);
          }
  
          throw new AuthSecurityException($msg);
      }
code: protected function _validatePost(Controller $controller)
      {
          $token = $this->_validToken($controller);
          $hashParts = $this->_hashParts($controller);
          $check = hash_hmac('sha1', implode('', $hashParts), Security::getSalt());
  
          if (hash_equals($check, $token)) {
              return true;
          }
  
          $msg = self::DEFAULT_EXCEPTION_MESSAGE;
          if (Configure::read('debug')) {
              $msg = $this->_debugPostTokenNotMatching($controller, $hashParts);
          }
  
          throw new AuthSecurityException($msg);
      }
code_tokens: protected function _validatePost ( Controller $ controller ) { $ token = $ this -> _validToken ( $ controller ) ; $ hashParts = $ this -> _hashParts ( $ controller ) ; $ check = hash_hmac ( 'sha1' , implode ( '' , $ hashParts ) , Security :: getSalt ( ) ) ; if ( hash_equals ( $ check , $ token ) ) { return true ; } $ msg = self :: DEFAULT_EXCEPTION_MESSAGE ; if ( Configure :: read ( 'debug' ) ) { $ msg = $ this -> _debugPostTokenNotMatching ( $ controller , $ hashParts ) ; } throw new AuthSecurityException ( $ msg ) ; }
docstring: Validate submitted form
  
  @param \Cake\Controller\Controller $controller Instantiating controller
  @throws \Cake\Controller\Exception\AuthSecurityException
  @return bool true if submitted form is valid
docstring_tokens: Validate submitted form