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 --
I think you're confusing encryption with compiled binary.
Not even commercial closed-source software such as Microsoft Office or Adobe Photoshop are encrypted for distribution. But they are compiled to native machine code, which makes them hard to reverse engineer.
JavaScript has no such thing as a compiled binary. But, as more and more browsers move to bytecode compilation to achieve faster performance, we may someday have a compiled JavaScript source format. Perhaps, analogous to Python's .py
and .pyc
files, maybe we'll have a .jsc
or JavaScript Compiled file, that can be delivered to the browser in binary form, to run in its JavaScript virtual machine.
No such thing exists yet though. And even if it did, this is just a more intense obfuscation. Obfuscation is fine for preventing casual copying and sharing, but if you need really protect your intellectual property, move the logic server-side.