const FORMAT_STATUSES = -2;
const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it
+ const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility
+
protected static $shareTypeUserAndGroups = -1;
protected static $shareTypeGroupUserUnique = 2;
protected static $backends = array();
if (isset($oldToken)) {
$token = $oldToken;
} else {
- $token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($tokenLength,
+ $token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(self::TOKEN_LENGTH,
\OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_UPPER.
\OCP\Security\ISecureRandom::CHAR_DIGITS
);