/**
* Get the expanded key
*
* @param integer $blockSize Blocksize to process
* @param string $iv IV
*
* @return string
*/
public function getExpandedKey($blockSize, $iv)
{
$key = $this->key;
$passLength = \strlen($key);
if (\function_exists('mb_strlen')) {
$passLength = mb_strlen($key, 'ASCII');
}
if ($passLength != $blockSize) {
$iterations = 1000;
$salt = $this->adapter->resizeKey($iv, 16);
$key = hash_pbkdf2('sha256', $this->key, $salt, $iterations, $blockSize, true);
}
return $key;
}