Generates a random, base-64 encoded, URL-safe, sha-256 hashed string.
int $count: The number of characters (bytes) of the string to be hashed.
string A base-64 encoded sha-256 hash, with + replaced with -, / with _ and any = padding characters removed.
\Drupal\Component\Utility\Crypt::randomBytes()
\Drupal\Component\Utility\Crypt::hashBase64()
public static function randomStringHashed($count) {
return static::hashBase64(static::randomBytes($count));
}