Possible Duplicate:
Google Chrome - Alphanumeric hashes to identify extensions
I'm building a Chrome extension packager, and am trying to figure out how to programmatically generate the appID from the package contents.
The appID is a 32-byte string consisting of lower-case letters, like these:
According to the Chrome extension documentation, the appID is "generated based on a hash of the extension's public key," and is used to uniquely identify an extension.
Since I'd like to be able to package an extension without using the Chrome GUI, and the public key is already included in the package contents, can anyone tell me how these are generated?
It is SHA256 of the public key encoded into string in a special way:
http://codesearch.google.com/#OAMlx_jo-ck/src/chrome/browser/extensions/extension_service.cc&exact_package=chromium&q=Extension::GenerateId&type=cs&l=1200
http://codesearch.google.com/#OAMlx_jo-ck/src/chrome/common/extensions/extension.cc&exact_package=chromium&q=GenerateId&type=cs&l=375
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With