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

FromOtpUrl(Uri, out String, out Byte[], out IDictionary<String, String>)

Creates either a TimeBasedPasswordGenerator or CounterBasedPasswordGenerator instance pre-configured with values from an otp style uri.

Declaration
public static IOnetimePasswordGenerator FromOtpUrl(Uri url, out string label, out byte[] secret, out IDictionary<string, string> metadata)
Parameters
Type Name Description
Uri url

The url to parse and turn into a password generator.

System.String label

An out parameter returning the name of the account or resource accessed using the generated passwords.

System.Byte[] secret

An out paramete returning the secret used by the generator.

IDictionary<System.String, System.String> metadata

A dictionary containing additional metadata retrieved from the URL.

Returns
Type Description
IOnetimePasswordGenerator

A pre-configured instance of either a TimeBasedPasswordGenerator or CounterBasedPasswordGenerator.

Remarks

See https://github.com/google/google-authenticator/tree/master/mobile/ios for details of the uri format.

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

FromOtpUrl(Uri)

Creates either a TimeBasedPasswordGenerator or CounterBasedPasswordGenerator instance pre-configured with values from an otp style uri.

Declaration
public static OnetimePasswordAccount FromOtpUrl(Uri url)
Parameters
Type Name Description
Uri url

The url to parse and turn into a password generator.

Returns
Type Description
OnetimePasswordAccount

A pre-configured instance of either a TimeBasedPasswordGenerator or CounterBasedPasswordGenerator.

Remarks

See https://github.com/google/google-authenticator/wiki/Key-Uri-Format for details of the uri format.

See Also
GetOtpUrl(String, String, Int32, Byte[], TimeSpan, IDictionary<String, String>)
Back to top Copyright (c) 2017 Troy Willmot