protected function derivateSecureKeys($key, $pbkdf2Salt = null)
    {
        if (!$pbkdf2Salt) {
            if (!$this->pbkdf2Salt) {
                $this->pbkdf2Salt = $this->randomPseudoBytes(static::PBKDF2_SALT_BYTE_SIZE);
            }

            $pbkdf2Salt = $this->pbkdf2Salt;
        }

        $iteration = $this->options['pbkdf2_iteration'] ?: 12000;

        list($this->secureEncryptionKey, $this->secureHMACKey) = str_split(
            $this->pbkdf2(
                static::PBKDF2_HASH_ALGORITHM,
                $key,
                $pbkdf2Salt,
                $iteration,
                static::PBKDF2_HASH_BYTE_SIZE * 2,
                true
            ),
            self::PBKDF2_HASH_BYTE_SIZE
        );
    }