diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 2b3d62eb4..251a81db3 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -7,8 +7,8 @@ import svgPlugin from 'esbuild-plugin-svg-bundle'; import { copy } from 'esbuild-plugin-copy'; // import manifestPlugin from 'esbuild-plugin-manifest'; import manifestPlugin from 'esbuild-plugin-assets-manifest'; -import copyWithHashPlugin from '@enonic/esbuild-plugin-copy-with-hash'; -import inlineImportPlugin from 'esbuild-plugin-inline-import'; +// import copyWithHashPlugin from '@enonic/esbuild-plugin-copy-with-hash'; +// import inlineImportPlugin from 'esbuild-plugin-inline-import'; import { nodeModulesPolyfillPlugin } from 'esbuild-plugins-node-modules-polyfill'; const staticDir = './static'; diff --git a/frontend/src/lib/storage-manager/storage-manager.js b/frontend/src/lib/storage-manager/storage-manager.js index 0849ae933..32008e2ec 100644 --- a/frontend/src/lib/storage-manager/storage-manager.js +++ b/frontend/src/lib/storage-manager/storage-manager.js @@ -1,11 +1,11 @@ -// SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel , Gregor Kleen ,Johannes Eder ,Sarah Vaupel ,Sarah Vaupel +// SPDX-FileCopyrightText: 2022-2025 Sarah Vaupel , Gregor Kleen ,Johannes Eder ,Sarah Vaupel ,Sarah Vaupel // // SPDX-License-Identifier: AGPL-3.0-or-later /* global:writable */ import semver from 'semver'; -// import sodium from 'sodium-javascript'; +import sodium from 'sodium-javascript'; import { HttpClient } from '../../services/http-client/http-client'; @@ -501,10 +501,10 @@ function encrypt(plaintext, key) { // TODO use const if possible let plaintextB = Buffer.from(plaintext); let cipherB = Buffer.alloc(plaintextB.length + sodium.crypto_secretbox_MACBYTES); - let nonceB = undefined; // Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); + let nonceB = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); let keyB = Buffer.from(key); - // sodium.crypto_secretbox_easy(cipherB, plaintextB, nonceB, keyB); + sodium.crypto_secretbox_easy(cipherB, plaintextB, nonceB, keyB); const result = cipherB; console.log('encrypt result', result); @@ -524,7 +524,7 @@ function decrypt(ciphertext, key) { let nonceB = undefined; Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); let keyB = Buffer.from(key); - // sodium.crypto_secretbox_open_easy(plaintextB, cipherB, nonceB, keyB); + sodium.crypto_secretbox_open_easy(plaintextB, cipherB, nonceB, keyB); const result = plaintextB.toString(); console.log('decrypt result', result);