Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encrypt Chrome-extension?

Anyway to encrypt a Chrome-extension from not exposing the source code?

like image 445
jprim Avatar asked Dec 13 '10 05:12

jprim


2 Answers

you can hide your code using obfuscator. there are lots of available in market.

there are few tools like Google Closure compiler, and lots of online javascript ofuscators are available in market. you can use any. but it doesn't guarantee the confidentialness of the code. anyone expert with javascript can de-obfuscate that code.

Here are two methods: 1. make your functionality available via web services. so important code reside on server and extension will communicate with the server and will process the output from server. 2. use NPAPI but its not a good method.

As per me a good strategy is to try to give a good extensions to user. if there is already something awesome in market no body will try to copy your addon. try to be ahead of your competitors.

EDIT: NPAPI is deprecated.

like image 94
Hrishikesh Kale Avatar answered Sep 22 '22 08:09

Hrishikesh Kale


as you can read here you can't. you can make your code hard to read and understand, but thats all.

(that other question is about hiding the javascript-code in an html-page, but thats mostly the same (as far as i know, chrome-extension are just written in js/css/html, please correct me if i'm wrong))

like image 44
oezi Avatar answered Sep 22 '22 08:09

oezi