@tabcat/orbit-db-fsstore
Advanced tools
Comparing version 3.1.2 to 3.1.3
{ | ||
"name": "@tabcat/orbit-db-fsstore", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "a custom orbit-db store representing a file system", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -7,2 +7,3 @@ | ||
const { ab2str } = require('./util') | ||
const b64 = require('base64-js') | ||
@@ -14,4 +15,4 @@ const fsReducer = (crypter) => async (fs, { payload } = {}) => { | ||
const bytes = await crypter.decrypt( | ||
Uint8Array.from(payload.cipherbytes).buffer, | ||
Uint8Array.from(payload.iv) | ||
b64.toByteArray(payload.cipherbytes).buffer, | ||
b64.toByteArray(payload.iv) | ||
) | ||
@@ -18,0 +19,0 @@ payload = JSON.parse(ab2str(bytes)) |
@@ -9,2 +9,3 @@ | ||
const { str2ab } = require('./util') | ||
const b64 = require('base64-js') | ||
@@ -97,4 +98,4 @@ const paramCheckKeys = { | ||
payload = { | ||
cipherbytes: Array.from(new Uint8Array(cipherbytes)), | ||
iv: Array.from(iv) | ||
cipherbytes: b64.fromByteArray(new Uint8Array(cipherbytes)), | ||
iv: b64.fromByteArray(iv) | ||
} | ||
@@ -101,0 +102,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17773
381