Gemstone Common Library
Show/Hide TOC

# PasswordGeneratorGeneratePassword(Int32) Method

Generates a password with the given length.

## Definition

Namespace: Gemstone.Security.Cryptography
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.172 -- Release Build+241430fabc9f8d815f226ef82f939af6835b2b48
C#
View Source Request Example

    public string GeneratePassword(
    	int length
    )

VB
View Source Request Example

    Public Function GeneratePassword (
    	length As Integer
    ) As String

C++
View Source Request Example

    public:
    String^ GeneratePassword(
    	int length
    )

JavaScript
View Source Request Example

    function GeneratePassword(length);

#### Parameters

length Int32
  The length of the password to be generated.

#### Return Value

String
A randomly generated password.

## See Also

#### Reference

PasswordGenerator Class
GeneratePassword Overload
Gemstone.Security.Cryptography Namespace