• 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

Class CounterBasedPasswordGenerator

A onetime password generator based on a counter that increments on each successful login.

Inheritance
System.Object
OnetimePasswordGeneratorBase
CounterBasedPasswordGenerator
Implements
IOnetimePasswordGenerator
IDisposable
Inherited Members
OnetimePasswordGeneratorBase.HashAlgorithm
OnetimePasswordGeneratorBase.IsDisposed
OnetimePasswordGeneratorBase.PasswordLength
OnetimePasswordGeneratorBase.MovingFactor
OnetimePasswordGeneratorBase.GeneratedPassword
OnetimePasswordGeneratorBase.Dispose(Boolean)
OnetimePasswordGeneratorBase.SetSecret(Byte[])
OnetimePasswordGeneratorBase.Dispose()
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Yort.Otp
Assembly: cs.temp.dll.dll
Syntax
public sealed class CounterBasedPasswordGenerator : OnetimePasswordGeneratorBase, IOnetimePasswordGenerator, IDisposable
Remarks

Default values are SHA1, a 30 second time interval and a password length of 6. The default Counter value is zero.

Constructors

Name Description
CounterBasedPasswordGenerator()

Default constructor

CounterBasedPasswordGenerator()

Default constructor

CounterBasedPasswordGenerator(Boolean)

Partial constructor.

CounterBasedPasswordGenerator(Boolean)

Partial constructor.

CounterBasedPasswordGenerator(Boolean, Byte[])

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

CounterBasedPasswordGenerator(Boolean, Byte[])

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

Properties

Name Description
Counter

Sets or returns the current value of the 'counter' which is turned into a onetime use password.

Counter

Sets or returns the current value of the 'counter' which is turned into a onetime use password.

Back to top Copyright (c) 2017 Troy Willmot