public static function SystemStatusEncryption::getToken in System Status 7
Same name and namespace in other branches
- 6.2 system_status_encryption.inc \SystemStatusEncryption::getToken()
System Status: create a new token.
2 calls to SystemStatusEncryption::getToken()
- system_status_install in ./system_status.install 
- Implements hook_install().
- system_status_update_7200 in ./system_status.install 
- Creates an unique token.
File
- ./system_status_encryption.inc, line 12 
- Encryption logic for system_status
Class
- SystemStatusEncryption
- @file Encryption logic for system_status
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;
}