Lines Matching refs:ciphertext

721                     $ciphertext = '';
744 $ciphertext = substr($iv, $orig_pos) ^ $plaintext;
745 $iv = substr_replace($iv, $ciphertext, $orig_pos, $i);
752 …$ciphertext.= openssl_encrypt(substr($plaintext, 0, -$overflow) . str_repeat("\0", $this->block_si…
753 $iv = $this->_string_pop($ciphertext, $this->block_size);
758 $ciphertext.= $block;
761 …$ciphertext = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_o…
762 $iv = substr($ciphertext, -$this->block_size);
765 return $ciphertext;
767 …$ciphertext = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_o…
769 if (($len = strlen($ciphertext)) >= $this->block_size) {
770 $this->encryptIV = substr($ciphertext, -$this->block_size);
772 …$this->encryptIV = substr($this->encryptIV, $len - $this->block_size) . substr($ciphertext, -$len);
775 return $ciphertext;
801 $ciphertext = '';
815 $ciphertext = substr($iv, $orig_pos) ^ $plaintext;
816 $iv = substr_replace($iv, $ciphertext, $orig_pos, $i);
825 … $ciphertext.= mcrypt_generic($this->enmcrypt, substr($plaintext, $i, $len - $len % $block_size));
826 $iv = substr($ciphertext, -$block_size);
831 $ciphertext.= $iv;
842 $ciphertext.= $block;
848 return $ciphertext;
851 $ciphertext = mcrypt_generic($this->enmcrypt, $plaintext);
859 return $ciphertext;
873 $ciphertext = '';
877 $ciphertext.= $this->_encryptBlock(substr($plaintext, $i, $block_size));
886 $ciphertext.= $block;
902 $ciphertext.= $block ^ $key;
909 $ciphertext.= $block ^ $key;
944 $ciphertext = substr($iv, $orig_pos) ^ $plaintext;
945 $iv = substr_replace($iv, $ciphertext, $orig_pos, $i);
949 $ciphertext.= $iv;
957 $ciphertext.= $block;
962 $ciphertext = '';
967 $ciphertext .= ($c = $plaintext[$i] ^ $this->_encryptBlock($iv));
973 $this->encryptIV = substr($ciphertext, -$block_size);
975 … $this->encryptIV = substr($this->encryptIV, $len - $block_size) . substr($ciphertext, -$len);
989 $ciphertext.= $block ^ $key;
994 $ciphertext.= substr($plaintext, $i, $block_size) ^ $xor;
1006 $ciphertext = $this->_encryptBlock($plaintext);
1010 return $ciphertext;
1021 * @param string $ciphertext
1025 function decrypt($ciphertext) argument
1030 …$ciphertext = str_pad($ciphertext, strlen($ciphertext) + ($this->block_size - strlen($ciphertext) …
1040 …$plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_o…
1044 … $ciphertext.= @openssl_encrypt('', $this->cipher_name_openssl_ecb, $this->key, true);
1046 …$plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_o…
1050 …ding = str_repeat(chr($this->block_size), $this->block_size) ^ substr($ciphertext, -$this->block_s…
1051 …$ciphertext.= substr(@openssl_encrypt($padding, $this->cipher_name_openssl_ecb, $this->key, true),…
1056 …$plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_o…
1058 $this->decryptIV = substr($ciphertext, -$offset, $this->block_size);
1062 … $plaintext = $this->_openssl_ctr_process($ciphertext, $this->decryptIV, $this->debuffer);
1075 $len = strlen($ciphertext);
1090 $plaintext = substr($iv, $orig_pos) ^ $ciphertext;
1091 $iv = substr_replace($iv, substr($ciphertext, 0, $i), $orig_pos, $i);
1092 $ciphertext = substr($ciphertext, $i);
1096 …$plaintext.= openssl_decrypt(substr($ciphertext, 0, -$overflow), $this->cipher_name_openssl, $this…
1098 $iv = substr($ciphertext, -$overflow - $this->block_size, -$overflow);
1101 $plaintext.= $iv ^ substr($ciphertext, -$overflow);
1102 $iv = substr_replace($iv, substr($ciphertext, -$overflow), 0, $overflow);
1105 …$plaintext.= openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_o…
1106 $iv = substr($ciphertext, -$this->block_size);
1110 …$plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_o…
1112 if (($len = strlen($ciphertext)) >= $this->block_size) {
1113 $this->decryptIV = substr($ciphertext, -$this->block_size);
1115 …$this->decryptIV = substr($this->decryptIV, $len - $this->block_size) . substr($ciphertext, -$len);
1120 … $plaintext = $this->_openssl_ofb_process($ciphertext, $this->decryptIV, $this->debuffer);
1141 $len = strlen($ciphertext);
1157 $plaintext = substr($iv, $orig_pos) ^ $ciphertext;
1158 $iv = substr_replace($iv, substr($ciphertext, 0, $i), $orig_pos, $i);
1161 $cb = substr($ciphertext, $i, $len - $len % $block_size);
1168 $plaintext.= $iv ^ substr($ciphertext, -$len);
1169 $iv = substr_replace($iv, substr($ciphertext, -$len), 0, $len);
1178 $plaintext = mdecrypt_generic($this->demcrypt, $ciphertext);
1195 return $inline('decrypt', $this, $ciphertext);
1204 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
1205 $plaintext.= $this->_decryptBlock(substr($ciphertext, $i, $block_size));
1210 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
1211 $block = substr($ciphertext, $i, $block_size);
1222 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
1223 $block = substr($ciphertext, $i, $block_size);
1232 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
1233 $block = substr($ciphertext, $i, $block_size);
1241 if ($start = strlen($ciphertext) % $block_size) {
1254 $len = strlen($ciphertext);
1269 $plaintext = substr($iv, $orig_pos) ^ $ciphertext;
1270 $iv = substr_replace($iv, substr($ciphertext, 0, $i), $orig_pos, $i);
1274 $cb = substr($ciphertext, $i, $block_size);
1282 $plaintext.= $iv ^ substr($ciphertext, $i);
1283 $iv = substr_replace($iv, substr($ciphertext, $i), 0, $len);
1289 $len = strlen($ciphertext);
1293 $plaintext .= $ciphertext[$i] ^ $this->_encryptBlock($iv);
1294 $iv = substr($iv, 1) . $ciphertext[$i];
1299 $this->decryptIV = substr($ciphertext, -$block_size);
1301 … $this->decryptIV = substr($this->decryptIV, $len - $block_size) . substr($ciphertext, -$len);
1308 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
1309 $block = substr($ciphertext, $i, $block_size);
1318 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
1320 $plaintext.= substr($ciphertext, $i, $block_size) ^ $xor;
1326 if ($start = strlen($ciphertext) % $block_size) {
1332 $plaintext = $this->_decryptBlock($ciphertext);
1356 $ciphertext = '';
1373 $ciphertext.= $block ^ $otp;
1381 $ciphertext.= $block ^ $otp;
1391 return $ciphertext;
1395 … $ciphertext = $plaintext ^ $this->_string_shift($buffer['ciphertext'], strlen($plaintext));
1396 $plaintext = substr($plaintext, strlen($ciphertext));
1399 return $ciphertext;
1408 $ciphertext.= $encrypted . ($plaintext2 ^ $temp);
1414 …$ciphertext.= openssl_encrypt($plaintext . str_repeat("\0", $block_size), $this->cipher_name_opens…
1415 $temp = $this->_string_pop($ciphertext, $block_size);
1430 return $ciphertext;
1451 $ciphertext = $plaintext ^ $buffer['xor'];
1452 $buffer['xor'] = substr($buffer['xor'], strlen($ciphertext));
1453 $plaintext = substr($plaintext, strlen($ciphertext));
1455 $ciphertext = '';
1466 …$ciphertext.= openssl_encrypt(substr($plaintext, 0, -$overflow) . str_repeat("\0", $block_size), $…
1467 $xor = $this->_string_pop($ciphertext, $block_size);
1471 … $ciphertext.= $this->_string_shift($xor, $overflow) ^ substr($plaintext, -$overflow);
1476 …$ciphertext = openssl_encrypt($plaintext, $this->cipher_name_openssl, $key, $this->openssl_options…
1478 … $encryptIV = substr($ciphertext, -$block_size) ^ substr($plaintext, -$block_size);
1483 return $ciphertext;