You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

redis.token

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis.token - npm Package Compare versions

Comparing version

to
0.1.2

10

index.js

@@ -5,2 +5,3 @@ //Dependencies

var config = {}
var secret = "redis.token"
var client

@@ -13,11 +14,6 @@

config = {}
config.ttl = 3600
config.key = "redis.token"
} else {
if (!config.ttl) config.ttl = 3600
if (!config.key) config.key = "redis.token"
}
//Create the client
client = redis.createClient()
client = redis.createClient(config)

@@ -39,3 +35,3 @@ //Throw errors if there are any

})
var rKey = crypto.SHA3(config.key + Math.random()).toString()
var rKey = crypto.SHA3(secret + Math.random()).toString()
client.hmset(rKey,data, function(err,res) {

@@ -42,0 +38,0 @@ if (err) throw err

{
"name": "redis.token",
"version": "0.1.1",
"version": "0.1.2",
"description": " token based storage system in Redis that uses hashtables.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -27,4 +27,13 @@ [![Build Status](https://travis-ci.org/ChrisCates/redis.token.svg?branch=master)](https://travis-ci.org/ChrisCates/redis.token)

```
var redis = require("redis.token")
var config = {
host: "localhost",
port: 6379,
path: null,
url: null,
//etc (refer to redis npm docs for full configuration)
}
var redis = require("redis.token")(config)
redis.generate(

@@ -31,0 +40,0 @@ {