Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException

Ciphertext has invalid hex encoding.

phar:///var/www/ropeka.fi/www/protected/components/DefuseCrypto.phar/src/Crypto.php(297)

285 
286 
287 
288 
289 private static function decryptInternal($ciphertext, KeyOrPassword $secret, $raw_binary)
290 {
291 RuntimeTests::runtimeTest();
292 
293 if (! $raw_binary) {
294 try {
295 $ciphertext = Encoding::hexToBin($ciphertext);
296 } catch (Ex\BadFormatException $ex) {
297 throw new Ex\WrongKeyOrModifiedCiphertextException(
298 'Ciphertext has invalid hex encoding.'
299 );
300 }
301 }
302 
303 if (Core::ourStrlen($ciphertext) < Core::MINIMUM_CIPHERTEXT_SIZE) {
304 throw new Ex\WrongKeyOrModifiedCiphertextException(
305 'Ciphertext is too short.'
306 );
307 }
308 
309 

Stack Trace

#0
+
 phar:///var/www/ropeka.fi/www/protected/components/DefuseCrypto.phar/src/Crypto.php(151): Defuse\Crypto\Crypto::decryptInternal()
146 throw new \TypeError(
147 'Boolean expected for argument 3. ' . \ucfirst(\gettype($raw_binary)) . ' given instead.'
148 );
149 }
150 return self::decryptInternal(
151 $ciphertext,
152 KeyOrPassword::createFromPassword($password),
153 $raw_binary
154 );
155 }
156 
#1
+
 /var/www/ropeka.fi/www/protected/components/ReportController.php(1238): Defuse\Crypto\Crypto::decryptWithPassword()
1233     public function parseParam($param) {
1234         if( empty($param) ) {
1235             return false;
1236         }
1237 
1238         $paramStr = Defuse\Crypto\Crypto::decryptWithPassword(self::base64url_decode($param), self::ENCRYPT_KEY);
1239 
1240         return $this->parseParamStr($paramStr);
1241     }
1242 
1243     /**
#2
+
 /var/www/ropeka.fi/www/protected/components/ReportController.php(51): ReportController->parseParam()
46         } else if( isset($this->actionParams['search']) ) {
47             $param = $this->actionParams['search'];
48         } else {
49             $param = null;
50         }
51         if( $this->parseParam($param) ) {
52             if( $action->id != 'index' ) {
53                 if( !$this->isSummaryVisible() ) {
54                     return $this->redirect(array($this->id.'/index'));
55                 }
56             }
2024-03-29 14:10:54 Apache/2 Yii Framework/1.1.25