TheBlueSky.SwiftAuthenticator.Verifier 1.0.0

A simple and straightforward HOTP and TOTP verification library for .NET.

There is a newer version of this package available.
See the version list below for details.
Install-Package TheBlueSky.SwiftAuthenticator.Verifier -Version 1.0.0
dotnet add package TheBlueSky.SwiftAuthenticator.Verifier --version 1.0.0
<PackageReference Include="TheBlueSky.SwiftAuthenticator.Verifier" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TheBlueSky.SwiftAuthenticator.Verifier --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TheBlueSky.SwiftAuthenticator.Verifier, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install TheBlueSky.SwiftAuthenticator.Verifier as a Cake Addin
#addin nuget:?package=TheBlueSky.SwiftAuthenticator.Verifier&version=1.0.0

// Install TheBlueSky.SwiftAuthenticator.Verifier as a Cake Tool
#tool nuget:?package=TheBlueSky.SwiftAuthenticator.Verifier&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
  1. Create an instance of Authenticator:
var authenticator = new Authenticator();
  1. Create an instance of PasswordVerifier:
var verifier = new PasswordVerifier(authenticator);
  1. Verify password (will successfully verify passwords generated with the default values):
// HMAC-Based One-Time Password (HOTP)
var (isVerified, synchronizationValue) = verifier.VerifyCounterBasedPassword(hotp, secret, 28091977);

// Time-Based One-Time Password (TOTP)
var (isVerified, timeStepDrift) = verifier.VerifyTimeBasedPassword(totp, secret); // assuming totp is generated within the 30-second time step
  1. Create an instance of Authenticator:
var authenticator = new Authenticator();
  1. Create an instance of PasswordVerifier:
var verifier = new PasswordVerifier(authenticator);
  1. Verify password (will successfully verify passwords generated with the default values):
// HMAC-Based One-Time Password (HOTP)
var (isVerified, synchronizationValue) = verifier.VerifyCounterBasedPassword(hotp, secret, 28091977);

// Time-Based One-Time Password (TOTP)
var (isVerified, timeStepDrift) = verifier.VerifyTimeBasedPassword(totp, secret); // assuming totp is generated within the 30-second time step

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0 502 8/4/2018
1.0.1 440 7/21/2018
1.0.0 577 1/19/2018