OTP-0.0.0.1: HMAC-Based and Time-Based One-Time Passwords

Safe HaskellNone

Data.OTP

Description

Implements HMAC-Based One-Time Password Algorithm as defined in RFC 4226 and Time-Based One-Time Password Algorithm as defined in RFC 6238.

Synopsis

Documentation

hotpSource

Arguments

:: [Octet]

Secret key

-> Int

Counter value

-> Int

Number of digits in password

-> Int

HOTP

Compute an HOTP using secret key and counter value.

totpSource

Arguments

:: [Octet]

Secret key

-> UTCTime

Time

-> Int

Number of digits in password

-> Int

Period

-> Int

TOTP

Compute an TOTP using secret key and time.