如何用加密技术隐藏javascript? [关闭]

I am looking for method to hide my plugin's javascript with complex obfuscator but i read everywhere that it is not possible to hide javascript completely. I want to know that is there any way to hide java script with cryptography? can any one make the algorithm which can be adopt by every web hosting like they have php , jommla, java, magneto etc in which we can encrypt our javascript with our own secret key and we add this key in our license manager in our hosting and on user side we can add license manager client in our applications which need to connect our server and get that key to run our application.

Doing this would be almost exactly like deobfuscating the code. If you obfuscate the code, and provide it only on pages when you're logged in, then this would accomplish pretty much the same task. At some point, you'd need to fetch this key to decrypt it to run it on the client, and when that happens, someone can easily reverse engineer the decryption code and get to the code that's being run on the client side.

Simply put: If it's run on the client side, at some point, you'll have to get it into a state that the compiler can read. At this point, someone can inject code to fetch that code, and reverse engineer the output.