diff --git a/client/Data.ts b/client/Data.ts index 17ed9a3..829d27b 100644 --- a/client/Data.ts +++ b/client/Data.ts @@ -3,8 +3,8 @@ import { CryptoES } from './Imports.ts' const dataIsEmpty = !localStorage.tws_data || localStorage.tws_data == '' const aes = { - enc: (m: string, k: string) => CryptoES.AES.encrypt(m, k).toString(CryptoES.enc.Utf8), - dec: (m: string, k: string) => CryptoES.AES.decrypt(m, k).toString(CryptoES.enc.Utf8), + enc: (m: string, k: string) => CryptoES.AES.encrypt(m, k).toString(CryptoES.Utf8), + dec: (m: string, k: string) => CryptoES.AES.decrypt(m, k).toString(CryptoES.Utf8), } const key = location.host + '_TWS_姐姐' diff --git a/client/Imports.ts b/client/Imports.ts index 15ff7ad..4609b60 100644 --- a/client/Imports.ts +++ b/client/Imports.ts @@ -1,6 +1,6 @@ import * as React from 'https://esm.sh/react@18.3.1' import * as ReactDOM from 'https://esm.sh/react-dom@18.3.1' -import CryptoES from 'https://unpkg.com/crypto-es@3.0.4/dist/index.mjs' +import * as CryptoES from './static/crypto-es-3.1.0.static.mjs' import type { Dialog } from 'https://unpkg.com/mdui@2.1.4/components/dialog/index.d.ts' import type { TextField } from 'https://unpkg.com/mdui@2.1.4/components/text-field/index.d.ts' diff --git a/client/index.html b/client/index.html index cc2dd44..a63f62e 100644 --- a/client/index.html +++ b/client/index.html @@ -7,14 +7,14 @@ - - + - - + +