mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed GCM cookie decoding authtag.
This commit is contained in:
parent
34dde3f658
commit
43c8567b0d
2 changed files with 2 additions and 2 deletions
2
db.js
2
db.js
|
@ -296,7 +296,7 @@ module.exports.CreateDB = function (parent, func) {
|
|||
const iv = ciphertextBytes.slice(0, 12);
|
||||
const data = ciphertextBytes.slice(28);
|
||||
const aes = parent.crypto.createDecipheriv('aes-256-gcm', obj.dbRecordsDecryptKey, iv);
|
||||
aes.setAuthTag(ciphertextBytes.slice(12, 16));
|
||||
aes.setAuthTag(ciphertextBytes.slice(12, 28));
|
||||
var plaintextBytes, r;
|
||||
try {
|
||||
plaintextBytes = Buffer.from(aes.update(data));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue