| @@ 563-572 (lines=10) @@ | ||
| 560 | // where 1 is returned for ARCFour instead of 0. |
|
| 561 | if (($iv_size = mcrypt_enc_get_iv_size($params['handle'])) > 1) |
|
| 562 | { |
|
| 563 | if (mcrypt_enc_get_modes_name($params['handle']) !== 'ECB') |
|
| 564 | { |
|
| 565 | $iv = self::substr($data, 0, $iv_size); |
|
| 566 | $data = self::substr($data, $iv_size); |
|
| 567 | } |
|
| 568 | else |
|
| 569 | { |
|
| 570 | // MCrypt is dumb and this is ignored, only size matters |
|
| 571 | $iv = str_repeat("\x0", $iv_size); |
|
| 572 | } |
|
| 573 | } |
|
| 574 | else |
|
| 575 | { |
|
| @@ 616-624 (lines=9) @@ | ||
| 613 | */ |
|
| 614 | protected function _openssl_decrypt($data, $params) |
|
| 615 | { |
|
| 616 | if ($iv_size = openssl_cipher_iv_length($params['handle'])) |
|
| 617 | { |
|
| 618 | $iv = self::substr($data, 0, $iv_size); |
|
| 619 | $data = self::substr($data, $iv_size); |
|
| 620 | } |
|
| 621 | else |
|
| 622 | { |
|
| 623 | $iv = NULL; |
|
| 624 | } |
|
| 625 | ||
| 626 | return empty($params['handle']) |
|
| 627 | ? FALSE |
|