UNPKG
@iimm/shared
Version:
latest (2.5.0)
2.5.0
2.4.2
2.4.1
2.4.0
2.3.0
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0
1.3.2
1.3.1
1.3.0
1.2.1
1.2.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
shared utils on browser and react env
@iimm/shared
/
dist
/
esm
/
encrypt
/
index.d.ts
5 lines
(4 loc)
•
339 B
TypeScript
View Raw
1
2
3
4
5
/** 返回1个加了指定盐的内容加密器 */
export
declare
const
byteEncoder
:
(
salt
?:
string
,
EncodeURIComponent
?:
boolean
) =>
(
content
:
any
) =>
string
;
/** 使用指定盐解密(解密后会尝试JSON.parse) */
export
declare
const
byteDecoder
:
(
salt
?:
string
,
EncodeURIComponent
?:
boolean
) =>
(
encodedContent
:
string
) =>
any
;