Home | History | Annotate | Download | only in pydoc
      1 
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      3 <html><head><title>Python: module telemetry.internal.backends.chrome.crx_id</title>
      4 <meta charset="utf-8">
      5 </head><body bgcolor="#f0f0f8">
      6 
      7 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
      8 <tr bgcolor="#7799ee">
      9 <td valign=bottom>&nbsp;<br>
     10 <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.backends.html"><font color="#ffffff">backends</font></a>.<a href="telemetry.internal.backends.chrome.html"><font color="#ffffff">chrome</font></a>.crx_id</strong></big></big></font></td
     11 ><td align=right valign=bottom
     12 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/backends/chrome/crx_id.py">telemetry/internal/backends/chrome/crx_id.py</a></font></td></tr></table>
     13     <p><tt>Read&nbsp;a&nbsp;CRX&nbsp;file&nbsp;and&nbsp;write&nbsp;out&nbsp;the&nbsp;App&nbsp;ID&nbsp;and&nbsp;the&nbsp;Full&nbsp;Hash&nbsp;of&nbsp;the&nbsp;ID.<br>
     14 See:&nbsp;<a href="http://code.google.com/chrome/extensions/crx.html">http://code.google.com/chrome/extensions/crx.html</a><br>
     15 and&nbsp;'<a href="http://stackoverflow.com/questions/">http://stackoverflow.com/questions/</a>'<br>
     16 &nbsp;&nbsp;+&nbsp;'1882981/google-chrome-alphanumeric-hashes-to-identify-extensions'<br>
     17 for&nbsp;docs&nbsp;on&nbsp;the&nbsp;format.</tt></p>
     18 <p>
     19 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     20 <tr bgcolor="#aa55cc">
     21 <td colspan=3 valign=bottom>&nbsp;<br>
     22 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
     23     
     24 <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     25 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="base64.html">base64</a><br>
     26 </td><td width="25%" valign=top><a href="hashlib.html">hashlib</a><br>
     27 </td><td width="25%" valign=top><a href="json.html">json</a><br>
     28 </td><td width="25%" valign=top><a href="os.html">os</a><br>
     29 </td></tr></table></td></tr></table><p>
     30 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     31 <tr bgcolor="#eeaa77">
     32 <td colspan=3 valign=bottom>&nbsp;<br>
     33 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
     34     
     35 <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     36 <td width="100%"><dl><dt><a name="-GetCRXAppID"><strong>GetCRXAppID</strong></a>(filename, from_file_path<font color="#909090">=False</font>, is_win_path<font color="#909090">=False</font>)</dt></dl>
     37  <dl><dt><a name="-GetCRXHash"><strong>GetCRXHash</strong></a>(filename, from_file_path<font color="#909090">=False</font>, is_win_path<font color="#909090">=False</font>)</dt></dl>
     38  <dl><dt><a name="-GetPublicKey"><strong>GetPublicKey</strong></a>(filename, from_file_path, is_win_path<font color="#909090">=False</font>)</dt></dl>
     39  <dl><dt><a name="-GetPublicKeyFromPath"><strong>GetPublicKeyFromPath</strong></a>(filepath, is_win_path<font color="#909090">=False</font>)</dt></dl>
     40  <dl><dt><a name="-GetPublicKeyPacked"><strong>GetPublicKeyPacked</strong></a>(f)</dt></dl>
     41  <dl><dt><a name="-GetPublicKeyUnpacked"><strong>GetPublicKeyUnpacked</strong></a>(f, filepath)</dt></dl>
     42  <dl><dt><a name="-HasPublicKey"><strong>HasPublicKey</strong></a>(filename)</dt></dl>
     43  <dl><dt><a name="-HexTo256"><strong>HexTo256</strong></a>(hex_chars)</dt><dd><tt>Convert&nbsp;bytes&nbsp;to&nbsp;pairs&nbsp;of&nbsp;hex&nbsp;digits.&nbsp;E.g.,&nbsp;&nbsp;-&gt;&nbsp;"{0x00,&nbsp;0x11}"<br>
     44 The&nbsp;format&nbsp;is&nbsp;taylored&nbsp;for&nbsp;copy&nbsp;and&nbsp;paste&nbsp;into&nbsp;C&nbsp;code:<br>
     45 const&nbsp;uint8&nbsp;sha256_hash[]&nbsp;=&nbsp;{&nbsp;...&nbsp;};</tt></dd></dl>
     46  <dl><dt><a name="-HexToInt"><strong>HexToInt</strong></a>(hex_chars)</dt><dd><tt>Convert&nbsp;bytes&nbsp;like&nbsp;&nbsp;-&gt;&nbsp;171</tt></dd></dl>
     47  <dl><dt><a name="-HexToMPDecimal"><strong>HexToMPDecimal</strong></a>(hex_chars)</dt><dd><tt>Convert&nbsp;bytes&nbsp;to&nbsp;an&nbsp;MPDecimal&nbsp;string.&nbsp;Example&nbsp;&nbsp;-&gt;&nbsp;"aa"<br>
     48 This&nbsp;gives&nbsp;us&nbsp;the&nbsp;AppID&nbsp;for&nbsp;a&nbsp;chrome&nbsp;extension.</tt></dd></dl>
     49 </td></tr></table><p>
     50 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     51 <tr bgcolor="#55aa55">
     52 <td colspan=3 valign=bottom>&nbsp;<br>
     53 <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
     54     
     55 <tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     56 <td width="100%"><strong>EXPECTED_CRX_MAGIC_NUM</strong> = 'Cr24'<br>
     57 <strong>EXPECTED_CRX_VERSION</strong> = 2</td></tr></table>
     58 </body></html>