GeneratePassword Method
GeneratePassword(Memory<Char>)
Instruct the API to generate a password for the YubiKey.
C#
public ConfigureStaticPassword GeneratePassword(Memory<char> generatedPassword)
Parameters
Type | Name | Description |
---|---|---|
System.Memory<System.Char> | generatedPassword | Memory reference to contain the generated password. |
Returns
The ConfigureStaticPassword instance
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | You cannot both generate and specify a static password. |
System.ArgumentException | The static password must be between 1 and 38 characters. |
Remarks
The generated password will be placed in generatedPassword
.
The length of the generated password is directly controlled by the length
of the buffer supplied. The length of the password must be between 1 and
MaxPasswordLength.
This API can generate passwords by calling this method, or it can use a specified password. These are mutually exclusive, so if you use both, an exception will occur.