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

hoodie-plugin-store-crypto

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hoodie-plugin-store-crypto - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

lib/decrypt-doc.js

7

lib/bind-functions.js

@@ -5,3 +5,3 @@ 'use strict'

* Core of the plugin.
* All methos and event handling is setup here.
* All methods and event handling is setup here.
*

@@ -51,2 +51,7 @@ * Mostly copied and adjusted from https://github.com/hoodiehq/hoodie-store-client

if (prefix == null) {
api.encrypt = require('./encrypt-json').bind(null, state)
api.decrypt = require('./decrypt-json').bind(null, state)
}
if (prefix == null && isRoot) {

@@ -53,0 +58,0 @@ api.setup = require('./setup').bind(null, store, state)

2

lib/helpers/create-reset-keys.js

@@ -8,3 +8,3 @@ 'use strict'

var createKey = require('../create-key')
var encrypt = require('../encrypt')
var encrypt = require('../encrypt-doc')

@@ -11,0 +11,0 @@ module.exports = createResetKeys

@@ -35,6 +35,9 @@ 'use strict'

name: 'AES-GCM',
iv: iv,
additionalData: aad
iv: iv
}
if (aad != null) {
options.additionalData = aad
}
var encryptedData = Buffer.concat([data, tag])

@@ -50,3 +53,5 @@ return subtle.decrypt(options, cryptoKey, encryptedData)

var cipher = aes.createDecipheriv('aes-256-gcm', key, iv)
cipher.setAAD(aad)
if (aad != null) {
cipher.setAAD(aad)
}
cipher.setAuthTag(tag)

@@ -53,0 +58,0 @@

@@ -6,3 +6,3 @@ 'use strict'

var decrypt = require('../decrypt')
var decrypt = require('../decrypt-doc')

@@ -9,0 +9,0 @@ module.exports = decryptOne

@@ -35,6 +35,9 @@ 'use strict'

name: 'AES-GCM',
iv: iv,
additionalData: aad
iv: iv
}
if (aad != null) {
options.additionalData = aad
}
return subtle.encrypt(options, key, data)

@@ -54,3 +57,5 @@ })

var cipher = aes.createCipheriv('aes-256-gcm', key, iv)
cipher.setAAD(aad)
if (aad != null) {
cipher.setAAD(aad)
}

@@ -57,0 +62,0 @@ var output = cipher.update(data)

@@ -6,3 +6,3 @@ 'use strict'

var encrypt = require('../encrypt')
var encrypt = require('../encrypt-doc')

@@ -9,0 +9,0 @@ module.exports = encryptOne

{
"name": "hoodie-plugin-store-crypto",
"version": "3.1.0",
"version": "3.2.0",
"description": "End-to-end crypto plugin for the Hoodie client store.",

@@ -59,4 +59,4 @@ "main": "index.js",

"tap-spec": "^5.0.0",
"tape": "^4.12.0",
"textlint": "^11.5.0",
"tape": "^4.12.1",
"textlint": "^11.6.0",
"textlint-rule-alex": "^1.3.1",

@@ -63,0 +63,0 @@ "textlint-rule-common-misspellings": "^1.0.1",

Sorry, the diff of this file is not supported yet

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