• Home
  • API Documentation
Show / Hide Table of Contents
  • Yort.Otp
    • CounterBasedPasswordGenerator
      • Counter
      • CounterBasedPasswordGenerator
    • IHashAlgorithm
      • ComputeHash
      • Name
    • IOnetimePasswordGenerator
      • GeneratedPassword
      • HashAlgorithm
      • PasswordLength
      • SetSecret
    • MD5HashAlgorithm
      • ComputeHash
      • Name
    • OnetimePasswordAccount
      • Issuer
      • Label
      • Metadata
      • PasswordGenerator
      • Secret
    • OnetimePasswordGeneratorBase
      • Dispose
      • GeneratedPassword
      • HashAlgorithm
      • IsDisposed
      • MovingFactor
      • OnetimePasswordGeneratorBase
      • PasswordLength
      • SetSecret
    • OnetimePasswordGeneratorFactory
      • CreateFactory
      • CreateNewPasswordGenerator
      • FromOtpUrl
      • GetOtpUrl
    • OnetimePasswordSecret
      • FromAscii
      • FromBase32
      • FromHex
      • ToBase32
    • Resource
    • Resource.Attribute
    • Resource.String
      • ApplicationName
      • Hello
    • Sha1HashAlgorithm
      • ComputeHash
      • Name
    • Sha256HashAlgorithm
      • ComputeHash
      • Name
    • Sha512HashAlgorithm
      • ComputeHash
      • Name
    • TimeBasedPasswordGenerator
      • MovingFactor
      • TimeBasedPasswordGenerator
      • TimeInterval
      • Timestamp
      • ValidUntilUtc

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
OnetimePasswordGeneratorFactory

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
TimeBasedPasswordGenerator

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
OnetimePasswordGeneratorFactory

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
TimeBasedPasswordGenerator
Back to top Copyright (c) 2017 Troy Willmot