What if the front-end encryption libraries crypto-js and jsencrypt are too large?

after joining these two libraries, the package is about 100k more, how to break it?

I only need encryption, not decryption, but the code looks confused and can"t be separated.
to say the least, even if it is separated, it will not be much less, and 60k is not enough!

I must use AES and RSA encryption. What should I do?

Jan.10,2022

use their cdn to introduce that there is no need to call the package page for execution.


here is the crypto-js directory structure

aes.js
bower.json
cipher-core.js
CONTRIBUTING.md
core.js
crypto-js.js
enc-base64.js
enc-hex.js
enc-latin1.js
enc-utf8.js
enc-utf8.js
evpkdf.js
format-hex.js
format-openssl.js
hmac-md5.js
hmac-ripemd160.js
hmac-sha1.js
hmac-sha224.js
br -sha256.js
"hmac-sha3.js
" hmac-sha384.js
"hmac-sha512.js
" hmac.js
"index.js
" lib-typedarrays.js
"lib-typedarrays.js
" md5.js
"mode-cfb.js
" mode-ctr-gladman.js
"mode-ctr.js
" mode-ecb.js
mode-ofb.js
"package.json
pad-ansix923.js
pad-iso10126.js
pad-iso97971.js
br br < br "pad-pkcs7.js
" pad-zeropadding.js
"pbkdf2.js
"rabbit-legacy.js
"rabbit.js
"rc4.js
" README.md
"ripemd160.js
" sha1.js
"sha256.js
" sha3.js
"sha384.js
sha512.js
" tripledes.js
"x64-core.js
"
trophy docs

you only use AES to quote aes.js. Why introduce the whole thing

?

as for jsencrypt, there is no good way to find other packages that only support rsa

.

the rest of the optimization is to turn on gzip


introduce the required modules separately

Menu