OLD | NEW |
1 <div id="pageData-name" class="pageData">CRX Package Format</div> | 1 <h1>CRX Package Format</h1> |
2 <div id="pageData-showTOC" class="pageData">true</div> | 2 |
3 | 3 |
4 <p> | 4 <p> |
5 CRX files are ZIP files with a special header and the <code>.crx</code> file | 5 CRX files are ZIP files with a special header and the <code>.crx</code> file |
6 extension. | 6 extension. |
7 </p> | 7 </p> |
8 | 8 |
9 <h2>Package header</h2> | 9 <h2>Package header</h2> |
10 | 10 |
11 <p> | 11 <p> |
12 The header contains the author's public key and the extension's signature. | 12 The header contains the author's public key and the extension's signature. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 crmagic_hex="4372 3234" # Cr24 | 138 crmagic_hex="4372 3234" # Cr24 |
139 version_hex="0200 0000" # 2 | 139 version_hex="0200 0000" # 2 |
140 pub_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$pub" | awk '{print $5}'))) | 140 pub_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$pub" | awk '{print $5}'))) |
141 sig_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$sig" | awk '{print $5}'))) | 141 sig_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$sig" | awk '{print $5}'))) |
142 ( | 142 ( |
143 echo "$crmagic_hex $version_hex $pub_len_hex $sig_len_hex" | xxd -r -p | 143 echo "$crmagic_hex $version_hex $pub_len_hex $sig_len_hex" | xxd -r -p |
144 cat "$pub" "$sig" "$zip" | 144 cat "$pub" "$sig" "$zip" |
145 ) > "$crx" | 145 ) > "$crx" |
146 echo "Wrote $crx" | 146 echo "Wrote $crx" |
147 </pre> | 147 </pre> |
148 | |
OLD | NEW |