hypercore 10.26.3 → 10.26.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,11 @@ module.exports = class BlockEncryption {
16
16
  this.compat = compat
17
17
  this.isBlockKey = isBlockKey
18
18
 
19
- if (!isBlockKey) sodium.crypto_generichash_batch(this.blockKey, compat ? [encryptionKey] : [BLOCK_ENCRYPTION, encryptionKey], hypercoreKey)
19
+ if (!isBlockKey) {
20
+ if (compat) sodium.crypto_generichash_batch(this.blockKey, [encryptionKey], hypercoreKey)
21
+ else sodium.crypto_generichash_batch(this.blockKey, [BLOCK_ENCRYPTION, hypercoreKey, encryptionKey])
22
+ }
23
+
20
24
  sodium.crypto_generichash(this.blindingKey, this.blockKey)
21
25
  }
22
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.26.3",
3
+ "version": "10.26.4",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {