Мелкие поправки

This commit is contained in:
Book Pauk
2019-03-13 00:57:09 +07:00
parent b50498fa46
commit ff3674aca7

View File

@@ -72,7 +72,7 @@ class ServerStorage extends Vue {
let encrypted = null; let encrypted = null;
try { try {
encrypted = await cryptoUtils.aesEncrypt(comp, this.serverStorageKey); encrypted = await cryptoUtils.aesEncrypt(comp, this.serverStorageKey);
} catch(e) { } catch (e) {
throw new Error('encrypt failed'); throw new Error('encrypt failed');
} }
encoded.data = '1' + utils.toBase64(Buffer.from(encrypted)); encoded.data = '1' + utils.toBase64(Buffer.from(encrypted));
@@ -102,7 +102,7 @@ class ServerStorage extends Vue {
let decrypted = null; let decrypted = null;
try { try {
decrypted = await cryptoUtils.aesDecrypt(a, this.serverStorageKey); decrypted = await cryptoUtils.aesDecrypt(a, this.serverStorageKey);
} catch(e) { } catch (e) {
throw new Error('decrypt failed'); throw new Error('decrypt failed');
} }
decoded.data = JSON.parse(utils.pako.inflate(decrypted, {to: 'string'})); decoded.data = JSON.parse(utils.pako.inflate(decrypted, {to: 'string'}));