Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ilmanzo committed Feb 28, 2020
1 parent cd4c77d commit 0a8d385
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ A small D library to generate the google authenticator code.

inspired from https://github.com/tilaklodha/google-authenticator

- Install D Language https://dlang.org/
- Install a D Language compiler https://dlang.org/
- Install Dub package manager
- On OSX run `brew install dub`.
- On Ubuntu `snap install --classic dub`
- Follow instructions on https://code.dlang.org/ for other OSes.


Expand All @@ -24,5 +25,25 @@ The library exposes two functions:

more details on the algorithm on https://en.wikipedia.org/wiki/HMAC-based_One-time_Password_algorithm

usage:
1. add the library as a dependency in your dub project:

```
$ dub add gauthenticator
```
2. use the library by calling getTOTPToken() or getHOTPToken() functions

```
import std.stdio;
import gauthenticator;
void main()
{
writeln(getTOTPToken("foobarbaz"));
}
```





0 comments on commit 0a8d385

Please sign in to comment.