merge-requests/1/merge
Matthew 2019-11-16 23:26:34 -05:00
parent e18307cb7f
commit 747a9a7ae5
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ export default class Security {
const cipher = crypto.createCipheriv('aes-256-gcm', this.keys.key, this.keys.iv); const cipher = crypto.createCipheriv('aes-256-gcm', this.keys.key, this.keys.iv);
let encrypted = cipher.update(JSON.stringify(account), 'utf8', 'base64'); let encrypted = cipher.update(JSON.stringify(account), 'utf8', 'base64');
encrypted += cipher.final('base64'); encrypted += cipher.final('base64');
account.updateOne({ salt }); await account.updateOne({ salt });
return `${salt}:${encrypted}`; return `${salt}:${encrypted}`;
} }