@@ 406-414 (lines=9) @@ | ||
403 | ? mcrypt_create_iv($iv_size, MCRYPT_DEV_URANDOM) |
|
404 | : NULL; |
|
405 | ||
406 | if (mcrypt_generic_init($params['handle'], $params['key'], $iv) < 0) |
|
407 | { |
|
408 | if ($params['handle'] !== $this->_handle) |
|
409 | { |
|
410 | mcrypt_module_close($params['handle']); |
|
411 | } |
|
412 | ||
413 | return FALSE; |
|
414 | } |
|
415 | ||
416 | // Use PKCS#7 padding in order to ensure compatibility with OpenSSL |
|
417 | // and other implementations outside of PHP. |
|
@@ 579-587 (lines=9) @@ | ||
576 | $iv = NULL; |
|
577 | } |
|
578 | ||
579 | if (mcrypt_generic_init($params['handle'], $params['key'], $iv) < 0) |
|
580 | { |
|
581 | if ($params['handle'] !== $this->_handle) |
|
582 | { |
|
583 | mcrypt_module_close($params['handle']); |
|
584 | } |
|
585 | ||
586 | return FALSE; |
|
587 | } |
|
588 | ||
589 | $data = mdecrypt_generic($params['handle'], $data); |
|
590 | // Remove PKCS#7 padding, if necessary |