Git Product home page Git Product logo

otpy's Introduction

Build Status

OTPy

I needed to handle One Time Passwords per RFC 4226, 6238 and 2289, but all the libraries on pypi were not valid and returned invalid values per the tests present in the Appendices. Therefore, I set about making my own.

Thanks

Thanks to Laura for the name.

Current Status

RFC 2289 - OTP

Implemented. Only supports MD4 and MD5.

RFC 4226 - HOTP

Implemented. All tests complete good per the test values in Appendix D of RFC 4426.

RFC 6238 - TOTP

Partially Implemented. Only supports SHA1 at the moment, but all unit tests completed successfully per the test values in the Appendix.

Guarantees

Provide a verification method

All implementations provide a method to verify a key given a specific set of values.

Provide an at method

Another problem I found with other libraries is that some failed to provide an at method. A method which would accept a specific counter or pass phrase and return the result.

Type Consistency

All the codes are turned as strings so that we don't strip leading zeros.

Provide a drift method

I only found one implementation with a drift method, even though it's specified in all 3 RFCs that one should exist. You'll find mine conveniently named drift. Mostly for accepting codes, this allows you to easily generate a range of codes so that you can compensate for latency per RFC recommendations.

otpy's People

Contributors

ccubed avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.