From fcee7d4eb71471dd40567c8d7c97302eeee80697 Mon Sep 17 00:00:00 2001
From: Vben <anncwb@126.com>
Date: 星期五, 26 二月 2021 20:09:24 +0800
Subject: [PATCH] perf: move src/types to root

---
 src/utils/cache/storageCache.ts |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/utils/cache/storageCache.ts b/src/utils/cache/storageCache.ts
index bc30b45..d965afc 100644
--- a/src/utils/cache/storageCache.ts
+++ b/src/utils/cache/storageCache.ts
@@ -1,6 +1,8 @@
 import { cacheCipher } from '/@/settings/encryptionSetting';
 
-import Encryption, { EncryptionParams } from './aesEncryption';
+import type { EncryptionParams } from '/@/utils/cipher';
+
+import { AesEncryption } from '/@/utils/cipher';
 
 export interface CreateStorageParams extends EncryptionParams {
   prefixKey: string;
@@ -20,7 +22,7 @@
     throw new Error('When hasEncrypt is true, the key or iv must be 16 bits!');
   }
 
-  const encryption = new Encryption({ key, iv });
+  const encryption = new AesEncryption({ key, iv });
 
   /**
    *Cache class
@@ -31,7 +33,7 @@
   const WebStorage = class WebStorage {
     private storage: Storage;
     private prefixKey?: string;
-    private encryption: Encryption;
+    private encryption: AesEncryption;
     private hasEncrypt: boolean;
     /**
      *

--
Gitblit v1.8.0