• 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 GetOtpUrl

GetOtpUrl(String, String, Int32, Byte[], Int64, IDictionary<String, String>)

Creates a new that can be used to configure an authentication app. These codes are normally used as the content of a QR code.

Declaration
public static Uri GetOtpUrl(string label, string algorithmName, int passwordLength, byte[] secret, Int64 counter, IDictionary<string, string> metadata)
Parameters
Type Name Description
System.String label

The name of the account or resource protected by this secret.

System.String algorithmName

The name of the algorithm used with the secret to generate passwords.

System.Int32 passwordLength

The length of the password, default is 6, usual values are 6 or 8.

System.Byte[] secret

The secret used to protect this account.

Int64 counter

The initial counter to use when generating passwords for this account.

IDictionary<System.String, System.String> metadata

A dictionary containing additional metadata to be encoded into the url. If this value is null or empty, no additional values are added.

Returns
Type Description
Uri

A new that can be used to configure an authentication app to generate compatible passwords.

See Also
FromOtpUrl(Uri)

GetOtpUrl(String, String, Int32, Byte[], TimeSpan, IDictionary<String, String>)

Creates a new that can be used to configure an authentication app. These codes are normally used as the content of a QR code.

Declaration
public static Uri GetOtpUrl(string label, string algorithmName, int passwordLength, byte[] secret, TimeSpan timeInterval, IDictionary<string, string> metadata)
Parameters
Type Name Description
System.String label

The name of the account or resource protected by this secret.

System.String algorithmName

The name of the algorithm used with the secret to generate passwords.

System.Int32 passwordLength

The length of the password, default is 6, usual values are 6 or 8.

System.Byte[] secret

The secret used to protect this account.

TimeSpan timeInterval

The time interval each generated password if valid for. Default value is 30.

IDictionary<System.String, System.String> metadata

A dictionary containing additional metadata to be encoded into the url. If this value is null or empty, no additional values are added.

Returns
Type Description
Uri

A new that can be used to configure an authentication app to generate compatible passwords.

See Also
FromOtpUrl(Uri)

GetOtpUrl(String, String, Int32, Byte[], Int64, IDictionary<String, String>)

Creates a new that can be used to configure an authentication app. These codes are normally used as the content of a QR code.

Declaration
public static Uri GetOtpUrl(string label, string algorithmName, int passwordLength, byte[] secret, Int64 counter, IDictionary<string, string> metadata)
Parameters
Type Name Description
System.String label

The name of the account or resource protected by this secret.

System.String algorithmName

The name of the algorithm used with the secret to generate passwords.

System.Int32 passwordLength

The length of the password, default is 6, usual values are 6 or 8.

System.Byte[] secret

The secret used to protect this account.

Int64 counter

The initial counter to use when generating passwords for this account.

IDictionary<System.String, System.String> metadata

A dictionary containing additional metadata to be encoded into the url. If this value is null or empty, no additional values are added.

Returns
Type Description
Uri

A new that can be used to configure an authentication app to generate compatible passwords.

See Also
FromOtpUrl(Uri)

GetOtpUrl(String, String, Int32, Byte[], TimeSpan, IDictionary<String, String>)

Creates a new that can be used to configure an authentication app. These codes are normally used as the content of a QR code.

Declaration
public static Uri GetOtpUrl(string label, string algorithmName, int passwordLength, byte[] secret, TimeSpan timeInterval, IDictionary<string, string> metadata)
Parameters
Type Name Description
System.String label

The name of the account or resource protected by this secret.

System.String algorithmName

The name of the algorithm used with the secret to generate passwords.

System.Int32 passwordLength

The length of the password, default is 6, usual values are 6 or 8.

System.Byte[] secret

The secret used to protect this account.

TimeSpan timeInterval

The time interval each generated password if valid for. Default value is 30.

IDictionary<System.String, System.String> metadata

A dictionary containing additional metadata to be encoded into the url. If this value is null or empty, no additional values are added.

Returns
Type Description
Uri

A new that can be used to configure an authentication app to generate compatible passwords.

See Also
FromOtpUrl(Uri)
Back to top Copyright (c) 2017 Troy Willmot