From ff3674aca79d011f6997865ac758ac3c619d5172 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 13 Mar 2019 00:57:09 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/ServerStorage/ServerStorage.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/components/Reader/ServerStorage/ServerStorage.vue b/client/components/Reader/ServerStorage/ServerStorage.vue index 93e3efac..cebb683e 100644 --- a/client/components/Reader/ServerStorage/ServerStorage.vue +++ b/client/components/Reader/ServerStorage/ServerStorage.vue @@ -72,7 +72,7 @@ class ServerStorage extends Vue { let encrypted = null; try { encrypted = await cryptoUtils.aesEncrypt(comp, this.serverStorageKey); - } catch(e) { + } catch (e) { throw new Error('encrypt failed'); } encoded.data = '1' + utils.toBase64(Buffer.from(encrypted)); @@ -102,7 +102,7 @@ class ServerStorage extends Vue { let decrypted = null; try { decrypted = await cryptoUtils.aesDecrypt(a, this.serverStorageKey); - } catch(e) { + } catch (e) { throw new Error('decrypt failed'); } decoded.data = JSON.parse(utils.pako.inflate(decrypted, {to: 'string'}));