OTP-Sharp 1.0.4.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package OTP-Sharp --version 1.0.4.1
NuGet\Install-Package OTP-Sharp -Version 1.0.4.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OTP-Sharp" Version="1.0.4.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OTP-Sharp --version 1.0.4.1
#r "nuget: OTP-Sharp, 1.0.4.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OTP-Sharp as a Cake Addin
#addin nuget:?package=OTP-Sharp&version=1.0.4.1

// Install OTP-Sharp as a Cake Tool
#tool nuget:?package=OTP-Sharp&version=1.0.4.1

This project is depricated, switch to OtpSharp for the current version


This is an implementation of HOTP and TOTP which are commonly used for multi factor authentication by using a shared key between the client and the server to generate and verify one time use codes.  This library is capable of generating and verifying both TOTP and HOTP authentication codes.  The calculations in this library are known to be compatible with Google 2-Step Verification and consequently the Google Authenticator smartphone app.  It is also known to be able to generate codes for Amazon Web Services Multi Factor Authentication and Dropbox 2 step authentication.  It should work with any other service or client that is RFC compliant.

This library is released under an MIT license. No warranty is provided as to the correctness of the library and the consumer of the library assumes all risk for the use thereof, as per the MIT license.

Every effort has gone into implementing this library in accordance with the RFCs mentioned above. However it is up to the users of this library to read through the RFCs and ensure that this implementation is in accordance with the security procedures outlined therein.

The implementation includes the code calculation as well as simple verification. Persistence of the keys, secure key storage, ensuring that a single code can't be validated multiple times and other things are not a part of this library. Thus far those functions (and any others mentioned in the RFCs) are up to the consumer of this library.

For documentation please visit the project website.

Product Compatible and additional computed target framework versions.
.NET Framework net35 is compatible.  net35-client is compatible.  net40 is compatible.  net40-client is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated

This project is depricated, switch to OtpSharp for the current version

1.0.4 Changed the Protected Key API to be more explicit (may break existing direct useage of the protected key)

The protected key no longer implicitly causes side effects (destroying the plaintext key provided must be done explicitly)

Added a time correction class with experimental NTP abilities.

Support for .net 3.5 as well as client profiles with some minor limitations.

1.0.3 Fixed unexpected behavior where the plaintext key provided to an HOTP or TOTP object will be scrambled.  Now it will remain intact.  Added constructor overloads to provide a protected key instead of a byte array if desired.