How can I encrypt JavaScript code so that it's not decryptable?

前端 未结 12 2186
温柔的废话
温柔的废话 2020-12-01 15:07

I have some JavaScript code I need to encrypt, but I want to be sure no one can decrypt it.

What tools can I use to do this?

-- Edit --

12条回答
  •  庸人自扰
    2020-12-01 15:33

    There is no way to do that. You can obscure it and have some domain checking code in it. Or you could have it served with a server-side script that checks the referring domain.

提交回复
热议问题