On 12/03/2013 05:37 PM, Tanstaafl wrote: > So, now the question is, how easy would it be to add this hashing > feature to the Thunderbird extension?
Should be pretty easy. There's an XPCOM interface already which can be used to compute the most common hashes directly in javascript: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsICryptoHash At the end of the page there's even an example on how compute the hash for a given file. It's a bit tricker on how to pass this hash to the user/email, since the Thunderbird interface has only a "URL" field for each uploaded file (and no description). If you really want to put the hash somewhere in the message, some extra steps might be necessary. But you could cheat, and change the function urlForFile() so that it includes an useless parameter in the request, such as: &sha1=HASH at the end, which is harmless, and would still provide the actual hash computed on the client side.