Lines Matching refs:substr

636                         $key = substr($t, 0, $dkLen);
638 $this->setKey(substr($key, 0, $dkLen >> 1));
639 $this->setIV(substr($key, $dkLen >> 1));
658 $key = substr($key, 0, $dkLen);
706 … return !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result;
710 $result = substr($result, 0, -$this->block_size);
713 $this->encryptIV = substr($result, -$this->block_size);
744 $ciphertext = substr($iv, $orig_pos) ^ $plaintext;
746 $plaintext = substr($plaintext, $i);
752 …$ciphertext.= openssl_encrypt(substr($plaintext, 0, -$overflow) . str_repeat("\0", $this->block_si…
756 $block = $iv ^ substr($plaintext, -$overflow);
762 $iv = substr($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);
815 $ciphertext = substr($iv, $orig_pos) ^ $plaintext;
825 … $ciphertext.= mcrypt_generic($this->enmcrypt, substr($plaintext, $i, $len - $len % $block_size));
826 $iv = substr($ciphertext, -$block_size);
830 … $iv = mcrypt_generic($this->ecb, $iv) ^ substr($plaintext, $i, $block_size);
840 $block = $iv ^ substr($plaintext, -$len);
877 $ciphertext.= $this->_encryptBlock(substr($plaintext, $i, $block_size));
883 $block = substr($plaintext, $i, $block_size);
896 $block = substr($plaintext, $i, $block_size);
906 $block = substr($plaintext, $i, $block_size);
915 $buffer['ciphertext'] = substr($key, $start) . $buffer['ciphertext'];
944 $ciphertext = substr($iv, $orig_pos) ^ $plaintext;
948 $iv = $this->_encryptBlock($iv) ^ substr($plaintext, $i, $block_size);
955 $block = $iv ^ substr($plaintext, $i);
968 $iv = substr($iv, 1) . $c;
973 $this->encryptIV = substr($ciphertext, -$block_size);
975 … $this->encryptIV = substr($this->encryptIV, $len - $block_size) . substr($ciphertext, -$len);
983 $block = substr($plaintext, $i, $block_size);
994 $ciphertext.= substr($plaintext, $i, $block_size) ^ $xor;
1001 $buffer['xor'] = substr($key, $start) . $buffer['xor'];
1050 …$padding = str_repeat(chr($this->block_size), $this->block_size) ^ substr($ciphertext, -$this->blo…
1051 …$ciphertext.= substr(@openssl_encrypt($padding, $this->cipher_name_openssl_ecb, $this->key, true),…
1058 $this->decryptIV = substr($ciphertext, -$offset, $this->block_size);
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);
1106 $iv = substr($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);
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);
1163 $iv = substr($cb, -$block_size);
1168 $plaintext.= $iv ^ substr($ciphertext, -$len);
1169 $iv = substr_replace($iv, substr($ciphertext, -$len), 0, $len);
1205 $plaintext.= $this->_decryptBlock(substr($ciphertext, $i, $block_size));
1211 $block = substr($ciphertext, $i, $block_size);
1223 $block = substr($ciphertext, $i, $block_size);
1233 $block = substr($ciphertext, $i, $block_size);
1242 $buffer['ciphertext'] = substr($key, $start) . $buffer['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);
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);
1309 $block = substr($ciphertext, $i, $block_size);
1320 $plaintext.= substr($ciphertext, $i, $block_size) ^ $xor;
1327 $buffer['xor'] = substr($key, $start) . $buffer['xor'];
1365 $block = substr($plaintext, $i, $block_size);
1368 … $result = !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result;
1377 $block = substr($plaintext, $i, $block_size);
1379 … $otp = !defined('OPENSSL_RAW_DATA') ? substr($otp, 0, -$this->block_size) : $otp;
1387 $buffer['ciphertext'] = substr($key, $start) . $buffer['ciphertext'];
1396 $plaintext = substr($plaintext, strlen($ciphertext));
1410 $buffer['ciphertext'] = substr($temp, $overflow);
1452 $buffer['xor'] = substr($buffer['xor'], strlen($ciphertext));
1453 $plaintext = substr($plaintext, strlen($ciphertext));
1466 …$ciphertext.= openssl_encrypt(substr($plaintext, 0, -$overflow) . str_repeat("\0", $block_size), $…
1471 … $ciphertext.= $this->_string_shift($xor, $overflow) ^ substr($plaintext, -$overflow);
1478 … $encryptIV = substr($ciphertext, -$block_size) ^ substr($plaintext, -$block_size);
1942 return substr($text, 0, -$length);
1961 …$this->encryptIV = $this->decryptIV = str_pad(substr($this->iv, 0, $this->block_size), $this->bloc…
1964 $this->key = str_pad(substr($this->key, 0, $this->key_length), $this->key_length, "\0");
1980 $substr = substr($string, 0, $index);
1981 $string = substr($string, $index);
1982 return $substr;
1997 $substr = substr($string, -$index);
1998 $string = substr($string, 0, -$index);
1999 return $substr;
2013 $temp = substr($var, -$i, 4);
2034 $temp = unpack('Nnum', str_pad(substr($var, 0, $remainder), 4, "\0", STR_PAD_LEFT));
2035 $temp = substr(pack('N', $temp['num'] + 1), -$remainder);
2668 $t = substr($bytes, $i, 20);