Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 0.1.1 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 @@ {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc