mirror of
https://github.com/LanceGin/jsotp.git
synced 2026-04-17 00:01:31 +08:00
upd: README
This commit is contained in:
@@ -15,25 +15,35 @@ The module was implement based on [RFC4226](https://tools.ietf.org/html/rfc4226)
|
||||
|
||||
### Installation
|
||||
|
||||
npm install jsotp
|
||||
```shell
|
||||
npm install jsotp
|
||||
```
|
||||
|
||||
### Module
|
||||
|
||||
All features support:
|
||||
All modules support:
|
||||
|
||||
let jsotp = require('jsotp');
|
||||
```javascript
|
||||
let jsotp = require('jsotp');
|
||||
```
|
||||
|
||||
Only `Base32` module support:
|
||||
|
||||
let jsotp = require('jsotp/base32');
|
||||
```javascript
|
||||
let jsotp = require('jsotp/base32');
|
||||
```
|
||||
|
||||
Only `HOTP` module support:
|
||||
|
||||
let jsotp = require('jsotp/hotp');
|
||||
```javascript
|
||||
let jsotp = require('jsotp/hotp');
|
||||
```
|
||||
|
||||
Only `TOTP` module support:
|
||||
|
||||
let jsotp = require('jsotp/totp');
|
||||
```javascript
|
||||
let jsotp = require('jsotp/totp');
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
@@ -99,5 +109,20 @@ let b32_secret = jsotp.Base32.random_gen();
|
||||
|
||||
#### • jsotp.HOTP.verify()
|
||||
|
||||
### Develop
|
||||
|
||||
* Clone depo and install dependencies
|
||||
|
||||
```shell
|
||||
git clone git@github.com:LanceGin/jsotp.git
|
||||
npm install
|
||||
```
|
||||
|
||||
* Contribute the code in `src/`, and run command below to build the es6 code to es2015. That will create a local directory named `lib/`.
|
||||
|
||||
```shell
|
||||
npm run build
|
||||
```
|
||||
|
||||
### [中文文档](docs/README_zh.md)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user