c3a10e6f916e4c0ef0aaddd9bedd9c611fbfeac7.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // import { oops } from "../../Oops";
  2. // import { EncryptUtil } from "../../utils/EncryptUtil";
  3. // import { IStorageSecurity } from "./StorageManager";
  4. // /**
  5. // * 本地存储加密
  6. // * 优点:
  7. // * 1、加密强度更高
  8. // *
  9. // * 缺点:
  10. // * 1、整体代码体积增加约200KB
  11. // * 2、需要下载 CryptoES 加密库
  12. // */
  13. // export class StorageSecurityCrypto implements IStorageSecurity {
  14. // private _key: string = null!;
  15. // private _iv: string = null!;
  16. // constructor() {
  17. // const key = oops.config.game.localDataKey;
  18. // const iv = oops.config.game.localDataIv;
  19. // EncryptUtil.initCrypto(key, iv);
  20. // this._key = EncryptUtil.md5(key);
  21. // this._iv = EncryptUtil.md5(iv);
  22. // }
  23. // decrypt(str: string): string {
  24. // return EncryptUtil.aesDecrypt(str, this._key, this._iv);
  25. // }
  26. // encrypt(str: string): string {
  27. // return EncryptUtil.aesEncrypt(str, this._key, this._iv);
  28. // }
  29. // encryptKey(str: string): string {
  30. // return EncryptUtil.md5(str);
  31. // }
  32. // }
  33. System.register(["cc"], function (_export, _context) {
  34. "use strict";
  35. var _cclegacy, _crd;
  36. return {
  37. setters: [function (_cc) {
  38. _cclegacy = _cc.cclegacy;
  39. }],
  40. execute: function () {
  41. _crd = true;
  42. _cclegacy._RF.push({}, "fbbbdioMCNOmI7KMEU46FfN", "StorageSecurityCrypto", undefined);
  43. _cclegacy._RF.pop();
  44. _crd = false;
  45. }
  46. };
  47. });
  48. //# sourceMappingURL=c3a10e6f916e4c0ef0aaddd9bedd9c611fbfeac7.js.map