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.159 -- Release Build+a612c25bc0e1c87e5766544ec4650d2ebcfddcf4
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