Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Commit bc85e34

Browse files
authored
Update codec.ts
1 parent 98cc291 commit bc85e34

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/global/codec.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @ts-ignore
22
// i'm not making types for aes.js lol
3-
// import { enc, dec } from "./aes.js";
3+
import { enc, dec } from "./aes.js";
44

55
const xor = {
66
encode: (str: string | undefined, key: number = 2) => {
@@ -28,18 +28,18 @@ const plain = {
2828
}
2929
}
3030

31-
// const aes = {
32-
// encode: (str: string | undefined) => {
33-
// if (!str) return str;
31+
const aes = {
32+
encode: (str: string | undefined) => {
33+
if (!str) return str;
3434

35-
// return encodeURIComponent(enc(str, 'dynamic').substring(10));
36-
// },
37-
// decode: (str: string | undefined) => {
38-
// if (!str) return str;
35+
return encodeURIComponent(enc(str, 'dynamic').substring(10));
36+
},
37+
decode: (str: string | undefined) => {
38+
if (!str) return str;
3939

40-
// return dec('U2FsdGVkX1' + decodeURIComponent(str), 'dynamic');
41-
// }
42-
// }
40+
return dec('U2FsdGVkX1' + decodeURIComponent(str), 'dynamic');
41+
}
42+
}
4343

4444
const none = {
4545
encode: (str: string | undefined) => str,
@@ -59,4 +59,4 @@ const base64 = {
5959
}
6060
}
6161

62-
export { xor, plain, none, base64, /*aes*/ };
62+
export { xor, plain, none, base64, aes };

0 commit comments

Comments
 (0)