src/DdvRestfulApi/Abstracts/AuthSign.php
public function createSessionKey($session_card = null)
    {
        $session_card = empty($session_card) ? $this->createSessionCard() : $session_card;
        $ua = $this->signInfo->getHeader('user-agent');
        $ua = empty($ua) ? microtime() : $ua;
        $session_key = strtolower(
            substr(md5($this->createSessionCard() . $session_card), 7, 4)
            . '-' . substr(md5($this->createSessionCard() . mt_rand() . $session_card . Sign::createGuid()), 7, 12)
            . '-' . substr(md5(uniqid(mt_rand(), true)), 15, 4) . '-' . Sign::createGuid() . '-' . substr(md5($ua), 15, 8)
            . '-' . substr(md5(uniqid(mt_rand(), true) . $session_card), 7, 12)
            . '-' . substr(md5(mt_rand() . $session_card), 7, 4)
            . '-' . substr(md5($session_card . mt_rand() . $session_card), 7, 8)
            . '-' . substr(md5($ua . mt_rand() . $ua . $session_card), 7, 4)
        );
        return $session_key;
    }
public function createSessionKey($session_card = null)
    {
        $session_card = empty($session_card) ? $this->createSessionCard() : $session_card;
        $ua = $this->signInfo->getHeader('user-agent');
        $ua = empty($ua) ? microtime() : $ua;
        $session_key = strtolower(
            substr(md5($this->createSessionCard() . $session_card), 7, 4)
            . '-' . substr(md5($this->createSessionCard() . mt_rand() . $session_card . Sign::createGuid()), 7, 12)
            . '-' . substr(md5(uniqid(mt_rand(), true)), 15, 4) . '-' . Sign::createGuid() . '-' . substr(md5($ua), 15, 8)
            . '-' . substr(md5(uniqid(mt_rand(), true) . $session_card), 7, 12)
            . '-' . substr(md5(mt_rand() . $session_card), 7, 4)
            . '-' . substr(md5($session_card . mt_rand() . $session_card), 7, 8)
            . '-' . substr(md5($ua . mt_rand() . $ua . $session_card), 7, 4)
        );
        return $session_key;
    }
生成session_key