Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-encryptor

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-encryptor - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

4

index.js

@@ -10,3 +10,3 @@ var crypto = require('crypto');

key: opts,
verifyHmac: true,
hmac: true,
debug: false

@@ -16,3 +16,3 @@ };

var key = opts.key;
var verifyHmac = opts.verifyHmac;
var verifyHmac = opts.hmac;
var debug = opts.debug;

@@ -19,0 +19,0 @@

{
"name": "simple-encryptor",
"version": "0.0.1",
"version": "1.0.0",
"description": "Simplified encryption/decryption for node.js",

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

@@ -70,3 +70,3 @@ # simple-encryptor

* `key` - the string key to derive the crypto key from. Specifically the crypto key will be derived as the SHA-256 hash of this key. This must be specified, there is no default.
* `verifyHmac` - whether or not to calculate the HMAC of the encrypted text and add that to the result. Additionally, if enabled this will verify the HMAC prior to decrypting. Adding HMACs will add 64-bytes to the result of each encryption (32-byte HMAC stored as hex). By default this is true.
* `hmac` - whether or not to calculate the HMAC of the encrypted text and add that to the result. Additionally, if enabled this will verify the HMAC prior to decrypting. Adding HMACs will add 64-bytes to the result of each encryption (32-byte HMAC stored as hex). By default this is true.
* `debug` - whether to log errors decrypting, by default this is false.

@@ -79,3 +79,3 @@

key: 'my secret key',
verifyHmac: false,
hmac: false,
debug: true

@@ -82,0 +82,0 @@ });

@@ -73,3 +73,3 @@ var assert = require('assert');

key: testKey,
verifyHmac: false
hmac: false
}

@@ -76,0 +76,0 @@ var encryptor = require('../index')(opts);

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