edgecast-token-generator
v1.0.3
Published
edgecast token generator
Downloads
37
Readme
Edgecast Token Generator
This is the Edgecast token generator written in javascript. It is ported over from ectoken_v3.c.
Usage
es2015:
import ecEncrypt from 'edgecast-token-generator';
ecEncrypt.generateToken(key, expireTime);
or using es5:
var ecEncrypt = require('edgecast-token-generator');
ecEncrypt.defaults.generateToken(key, expireTime);
Parameters:
- key: secret key (string or number)
- expireTime: expiration epoch time of token (string or number)
Returns:
- a token in string format
Development
npm install
npm run watch-js
npm run watch-test
npm run encrypt <key> <expireTime>