• 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

Constructor TimeBasedPasswordGenerator

TimeBasedPasswordGenerator()

Default constructor

Declaration
public TimeBasedPasswordGenerator()
Remarks

Initialises the instance so it will erase assigned secrets on dispose or change of secret, and with no current secret allocated.

TimeBasedPasswordGenerator(Boolean)

Partial constructor.

Declaration
public TimeBasedPasswordGenerator(bool eraseSecrets)
Parameters
Type Name Description
System.Boolean eraseSecrets

If true, secrets asssigned are overwritten with zero value bytes when this instance is disposed, or if a new secret is assigned. This helps reduce the chance of secrets ending up in swap files or being scraped from RAM.

Remarks

Use this if you are keeping secrets in memory and using them outside of class instances from this library, in which case eraseSecrets should be false to prevent the data from being overwritten unexpectedly.

TimeBasedPasswordGenerator(Boolean, Byte[])

Full constructor, initialises this instance with an already known secret.

Declaration
public TimeBasedPasswordGenerator(bool eraseSecrets, byte[] secret)
Parameters
Type Name Description
System.Boolean eraseSecrets

If true, secrets asssigned are overwritten with zero value bytes when this instance is disposed, or if a new secret is assigned. This helps reduce the chance of secrets ending up in swap files or being scraped from RAM.

System.Byte[] secret

A byte array containign the secret to use for generating passwords.

Remarks

If you are keeping secrets in memory and using them outside of class instances from this library, eraseSecrets should be false to prevent the data from being overwritten unexpectedly.

TimeBasedPasswordGenerator()

Default constructor

Declaration
public TimeBasedPasswordGenerator()
Remarks

Initialises the instance so it will erase assigned secrets on dispose or change of secret, and with no current secret allocated.

TimeBasedPasswordGenerator(Boolean)

Partial constructor.

Declaration
public TimeBasedPasswordGenerator(bool eraseSecrets)
Parameters
Type Name Description
System.Boolean eraseSecrets

If true, secrets asssigned are overwritten with zero value bytes when this instance is disposed, or if a new secret is assigned. This helps reduce the chance of secrets ending up in swap files or being scraped from RAM.

Remarks

Use this if you are keeping secrets in memory and using them outside of class instances from this library, in which case eraseSecrets should be false to prevent the data from being overwritten unexpectedly.

TimeBasedPasswordGenerator(Boolean, Byte[])

Full constructor, initialises this instance with an already known secret.

Declaration
public TimeBasedPasswordGenerator(bool eraseSecrets, byte[] secret)
Parameters
Type Name Description
System.Boolean eraseSecrets

If true, secrets asssigned are overwritten with zero value bytes when this instance is disposed, or if a new secret is assigned. This helps reduce the chance of secrets ending up in swap files or being scraped from RAM.

System.Byte[] secret

A byte array containign the secret to use for generating passwords.

Remarks

If you are keeping secrets in memory and using them outside of class instances from this library, eraseSecrets should be false to prevent the data from being overwritten unexpectedly.

Back to top Copyright (c) 2017 Troy Willmot