string c = "";
const string glyphs= "abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_-=+]}[{;:'/?.><,|`~"; //add the characters you want
int minCharAmount = 8; //minimuim length of your string
int maxCharAmount = 12; //maximium length of your string
int charAmount = Random.Range(minCharAmount, maxCharAmount);
for(int i=0; i<charAmount; i++)
{
c += glyphs[Random.Range(0, glyphs.Length)];
}