You are here

public static function SystemStatusEncryption::getToken in System Status 8.2

System Status: create a new token.

File

src/Services/SystemStatusEncryption.php, line 13

Class

SystemStatusEncryption
Encryption logic for system_status.

Namespace

Drupal\system_status\Services

Code

public static function getToken() {
  $chars = array_merge(range(0, 9), range('a', 'z'), range('A', 'Z'), range(0, 99));
  shuffle($chars);
  $token = "";
  for ($i = 0; $i < 8; $i++) {
    $token .= $chars[$i];
  }
  return $token;
}