Skip to content

An implementation of the OTP (One Time Password) generator algo in F#

License

Notifications You must be signed in to change notification settings

VitorRigoni/otp-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTP Generator

An implementation of the OTP generator algo in F#. This uses the standard time-based implementation according to RFC 6238 https://tools.ietf.org/html/rfc6238

Uses standard 6 digit/30 seconds.

Usage:

open Otp

let key = getUserKey // Save this to your DB and present to the user (usually done as a QR Code)

// Verify the user input
let userKey = "" // you got this from your DB
let result = getHotp key
if result = userInput then
  // do your thing (login successful maybe?)

Next steps

  • Add QR code generator
  • Make it a nuget package
  • Add project configuration
  • Add appveyor github actions 😁
  • Add sample
  • Tests?

This is just me trying stuff out, don't use in production.

About

An implementation of the OTP (One Time Password) generator algo in F#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages