OCA\Richdocuments\Db\Session::getUniqueSessionId PHP Method

getUniqueSessionId() protected method

protected getUniqueSessionId ( )
    protected function getUniqueSessionId()
    {
        $testSession = new Session();
        do {
            $id = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(30, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
        } while ($testSession->load($id)->hasData());
        return $id;
    }