GenRandomPassword Method

Returns a server-generated random password that complies with the given criteria.

Syntax

public string GenRandomPassword(int length, bool lowercase, bool uppercase, bool numbers, bool punctuation, bool spaces, string excludeChars, bool requireEach);
Public Function GenRandomPassword(ByVal Length As Integer, ByVal Lowercase As Boolean, ByVal Uppercase As Boolean, ByVal Numbers As Boolean, ByVal Punctuation As Boolean, ByVal Spaces As Boolean, ByVal ExcludeChars As String, ByVal RequireEach As Boolean) As String

Remarks

This method requests and returns a random password generated by the server based on a number of criteria.

The Length parameter specifies how long the password must be; it must be a value in the range 1 to 4096 (inclusive).

The Lowercase, Uppercase, Numbers, Punctuation, and Spaces parameters specify whether the server is allowed to include characters of each type. The Lowercase and Uppercase types cover ASCII characters only. For Punctuation, the applicable characters are: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~

The ExcludeChars parameters specifies a list of characters that must not be included in the password. For example, passing &" - would exclude ampersands, double quotes, spaces, and hyphens.

The RequireEach parameter specifies whether the server must include at least one of each allowed character type in the password.

Copyright (c) 2022 /n software inc. - All rights reserved.
Cloud Keys 2020 .NET Edition - Version 20.0 [Build 8157]