Zufallspasswort erstellen

/// <summary>
/// generiert zufälliges Passwort aus einer GUID
/// </summary>
/// <param name="iPWLength">max. Passwortlänge, max. 32 Zeichen</param>
/// <returns>zufälliges Passwort</returns>
private string RandomPassword(int iPWLength)
{
    string sGUID = Guid.NewGuid().ToString().Replace("-", "");

    if (sGUID.Length < iPWLength) iPWLength = sGUID.Length;

    return sGUID.Substring(0, iPWLength);
}