Update app-shell/src/encryption-utils.js

This commit is contained in:
admin 2025-04-13 22:16:06 +00:00
parent 20c72486aa
commit 1300209ee6

View File

@ -18,6 +18,10 @@ async function encryptData(data, encryptionKeyBase64 = schema_encryption_key) {
} }
const key = base64.decode(encryptionKeyBase64); const key = base64.decode(encryptionKeyBase64);
console.log(`[DEBUG] Decoded key length (bytes): ${key ? key.length : 0}`); // Добавили эту строку
const iv = crypto.randomBytes(12); const iv = crypto.randomBytes(12);
const cipher = crypto.createCipheriv(algorithm, key, iv); const cipher = crypto.createCipheriv(algorithm, key, iv);