Method CreateFactory
CreateFactory(Boolean, IHashAlgorithm, Int32)
Returns a factory instance that creates pre-configured CounterBasedPasswordGenerator instances.
Declaration
public static OnetimePasswordGeneratorFactory CreateFactory(bool eraseSecrets, IHashAlgorithm hashAlgorithm, int passwordLength)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eraseSecrets | True if the secrets provided to the generated CounterBasedPasswordGenerator instances should be overwritten in memory when the generator is disposed. |
IHashAlgorithm | hashAlgorithm | A IHashAlgorithm implementation that will be used by the CounterBasedPasswordGenerator instances to generate passwords. |
System.Int32 | passwordLength | The number of digits in the generated passwords, default is 6, usual values are 6 or 8. |
Returns
Type | Description |
---|---|
OnetimePasswordGeneratorFactory | A OnetimePasswordGeneratorFactory instance that can be used to create CounterBasedPasswordGenerator instances. |
See Also
CreateFactory(Boolean, IHashAlgorithm, Int32, TimeSpan)
Returns a factory instance that creates pre-configured TimeBasedPasswordGenerator instances.
Declaration
public static OnetimePasswordGeneratorFactory CreateFactory(bool eraseSecrets, IHashAlgorithm hashAlgorithm, int passwordLength, TimeSpan timeInterval)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eraseSecrets | True if the secrets provided to the generated TimeBasedPasswordGenerator instances should be overwritten in memory when the generator is disposed. |
IHashAlgorithm | hashAlgorithm | A IHashAlgorithm implementation that will be used by the TimeBasedPasswordGenerator instances to generate passwords. |
System.Int32 | passwordLength | The number of digits in the generated passwords, default is 6, usual values are 6 or 8. |
TimeSpan | timeInterval | The interval for which each password is valid, the default is 30 seconds. |
Returns
Type | Description |
---|---|
OnetimePasswordGeneratorFactory | A OnetimePasswordGeneratorFactory instance that can be used to create TimeBasedPasswordGenerator instances. |
See Also
CreateFactory(Boolean, IHashAlgorithm, Int32)
Returns a factory instance that creates pre-configured CounterBasedPasswordGenerator instances.
Declaration
public static OnetimePasswordGeneratorFactory CreateFactory(bool eraseSecrets, IHashAlgorithm hashAlgorithm, int passwordLength)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eraseSecrets | True if the secrets provided to the generated CounterBasedPasswordGenerator instances should be overwritten in memory when the generator is disposed. |
IHashAlgorithm | hashAlgorithm | A IHashAlgorithm implementation that will be used by the CounterBasedPasswordGenerator instances to generate passwords. |
System.Int32 | passwordLength | The number of digits in the generated passwords, default is 6, usual values are 6 or 8. |
Returns
Type | Description |
---|---|
OnetimePasswordGeneratorFactory | A OnetimePasswordGeneratorFactory instance that can be used to create CounterBasedPasswordGenerator instances. |
See Also
CreateFactory(Boolean, IHashAlgorithm, Int32, TimeSpan)
Returns a factory instance that creates pre-configured TimeBasedPasswordGenerator instances.
Declaration
public static OnetimePasswordGeneratorFactory CreateFactory(bool eraseSecrets, IHashAlgorithm hashAlgorithm, int passwordLength, TimeSpan timeInterval)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eraseSecrets | True if the secrets provided to the generated TimeBasedPasswordGenerator instances should be overwritten in memory when the generator is disposed. |
IHashAlgorithm | hashAlgorithm | A IHashAlgorithm implementation that will be used by the TimeBasedPasswordGenerator instances to generate passwords. |
System.Int32 | passwordLength | The number of digits in the generated passwords, default is 6, usual values are 6 or 8. |
TimeSpan | timeInterval | The interval for which each password is valid, the default is 30 seconds. |
Returns
Type | Description |
---|---|
OnetimePasswordGeneratorFactory | A OnetimePasswordGeneratorFactory instance that can be used to create TimeBasedPasswordGenerator instances. |