Show / Hide Table of Contents

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
Memory<char> generatedPassword

Memory reference to contain the generated password.

Returns

ConfigureStaticPassword

The ConfigureStaticPassword instance

Exceptions

Type Condition
InvalidOperationException

You cannot both generate and specify a static password.

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.

In this article
Back to top Generated by DocFX