Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would suggest to do something similar to what Git utilises(have a look at <a href="http://git-scm.com/book/en/Git-Internals-Git-Objects" rel="nofollow">http://git-scm.com/book/en/Git-Internals-Git-Objects</a> to understand how git implements it), i.e.</p> <blockquote> <p><strong>Creating SHA1 values of the content of every file in your chrome-extension</strong> and then re-create another SHA1 value of the concatenated SHA1 values obtained earlier.</p> </blockquote> <p>In this way, you can share the SHA1 value with your server and authenticate your extension, as the SHA1 value will change just in case any person, changes any of your file.</p> <p>Explaining it in more detail with some pseudo code:</p> <pre><code>function get_authentication_key(){ var files = get_all_files_in_extension, concatenated_sha_values = '', authentication_key; for(file in files){ concatenated_sha_values += Digest::SHA1.hexdigest(get_file_content(file)); } $.ajax({ url: 'http://example.com/getauthkey', type: 'post' async: false, success:function(data){ authentication_key = data; } }) //You may return either SHA value of concatenated values or return the concatenated SHA values return authentication_key; } // Server side code get('/getauthkey') do // One can apply several type of encryption algos on the string passed, to make it unbreakable authentication_key = Digest::&lt;encryption&gt;.hexdigest($_GET['string']); return authentication_key; end </code></pre> <p>This method allows you to check if any kind of file has been changed maybe an image file or a video file or any other file. Would be glad to know if this thing can be broken as well.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload