2019-02-28

This commit is contained in:
tastytea 2019-02-28 20:00:42 +01:00
parent 47498123af
commit 84525eeaec
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
21 changed files with 127 additions and 45 deletions

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
@ -48,8 +48,9 @@ $(function() {
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="classIdenticonpp.html#a229201bc23b0fabbcca60f2fe0188fa9">algorithm</a> enum name</td><td class="entry"><a class="el" href="classIdenticonpp.html">Identiconpp</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classIdenticonpp.html#a82f624d713e2d32d5fdb26b9112b821a">generate</a>(const string &amp;digest, const uint16_t width=100)</td><td class="entry"><a class="el" href="classIdenticonpp.html">Identiconpp</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classIdenticonpp.html#ad87f4b0b3ebb0e54fe862fb5d77f8a00">Identiconpp</a>(const uint8_t columns, const uint8_t rows, algorithm type=algorithm::ltr_symmetric, const string &amp;background=&quot;ffffffff&quot;, const vector&lt; string &gt; &amp;foreground={ &quot;000000ff&quot; }, const array&lt; const uint8_t, 2 &gt; &amp;padding={ 0, 0 })</td><td class="entry"><a class="el" href="classIdenticonpp.html">Identiconpp</a></td><td class="entry"><span class="mlabel">explicit</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>Testiconpp</b> (defined in <a class="el" href="classIdenticonpp.html">Identiconpp</a>)</td><td class="entry"><a class="el" href="classIdenticonpp.html">Identiconpp</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classIdenticonpp.html#ac4c9752b03d6e0a7c7950aee0637a82b">generate_base64</a>(const string &amp;magick, const string &amp;digest, const uint16_t width=100)</td><td class="entry"><a class="el" href="classIdenticonpp.html">Identiconpp</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classIdenticonpp.html#a55a4890677c963f24b89bd2aef906f1b">Identiconpp</a>(const uint8_t columns, const uint8_t rows, algorithm type=algorithm::ltr_symmetric, const string &amp;background=&quot;ffffffff&quot;, const vector&lt; string &gt; &amp;foreground={ &quot;000000ff&quot; }, const array&lt; uint8_t, 2 &gt; &amp;padding={ 0, 0 })</td><td class="entry"><a class="el" href="classIdenticonpp.html">Identiconpp</a></td><td class="entry"><span class="mlabel">explicit</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>Testiconpp</b> (defined in <a class="el" href="classIdenticonpp.html">Identiconpp</a>)</td><td class="entry"><a class="el" href="classIdenticonpp.html">Identiconpp</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
@ -46,8 +46,11 @@ $(function() {
<li>generate()
: <a class="el" href="classIdenticonpp.html#a82f624d713e2d32d5fdb26b9112b821a">Identiconpp</a>
</li>
<li>generate_base64()
: <a class="el" href="classIdenticonpp.html#ac4c9752b03d6e0a7c7950aee0637a82b">Identiconpp</a>
</li>
<li>Identiconpp()
: <a class="el" href="classIdenticonpp.html#ad87f4b0b3ebb0e54fe862fb5d77f8a00">Identiconpp</a>
: <a class="el" href="classIdenticonpp.html#a55a4890677c963f24b89bd2aef906f1b">Identiconpp</a>
</li>
</ul>
</div><!-- contents -->

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
@ -43,8 +43,11 @@ $(function() {
<li>generate()
: <a class="el" href="classIdenticonpp.html#a82f624d713e2d32d5fdb26b9112b821a">Identiconpp</a>
</li>
<li>generate_base64()
: <a class="el" href="classIdenticonpp.html#ac4c9752b03d6e0a7c7950aee0637a82b">Identiconpp</a>
</li>
<li>Identiconpp()
: <a class="el" href="classIdenticonpp.html#ad87f4b0b3ebb0e54fe862fb5d77f8a00">Identiconpp</a>
: <a class="el" href="classIdenticonpp.html#a55a4890677c963f24b89bd2aef906f1b">Identiconpp</a>
</li>
</ul>
</div><!-- contents -->

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">identiconpp
&#160;<span id="projectnumber">0.4.0</span>
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
@ -70,7 +70,7 @@ $(function() {
<p>You need to generate hashes yourself, any hexadecimal string will do. Make sure to use a safe hashing algorithm for sensitive data (<b>not MD5</b>). You can select as many columns and rows as you like, but make sure you have enough entropy. If something seems to be wrong, exceptions will be thrown.</p>
<p>The "sigil" algorithm generates the same results as <a href="https://github.com/cupcake/sigil/">sigil</a> and <a href="https://github.com/azaghal/pydenticon/">pydenticon</a>.</p>
<h3>Example</h3>
<div class="fragment"><div class="line">{C++}</div><div class="line">// Compile with g++ $(Magick++-config --cppflags --ldflags) -lidenticonpp</div><div class="line">#include &lt;identiconpp.hpp&gt;</div><div class="line">#include &lt;Magick++/Image.h&gt;</div><div class="line"></div><div class="line">int main()</div><div class="line">{</div><div class="line"> Identiconpp identicon(5, 5, Identiconpp::algorithm::ltr_symmetric,</div><div class="line"> &quot;ffffff80&quot;, { &quot;800000ff&quot; }, { 10, 10 });</div><div class="line"> Magick::Image img;</div><div class="line"> img = identicon.generate(&quot;55502f40dc8b7c769880b10874abc9d0&quot;, 200);</div><div class="line"> img.write(&quot;identicon.png&quot;);</div><div class="line">}</div></div><!-- fragment --><h3>C interface</h3>
<div class="fragment"><div class="line">{C++}</div><div class="line">// Compile with g++ $(Magick++-config --cppflags --ldflags) -lidenticonpp</div><div class="line">#include &lt;iostream&gt;</div><div class="line">#include &lt;identiconpp.hpp&gt;</div><div class="line">#include &lt;Magick++/Image.h&gt;</div><div class="line"></div><div class="line">int main()</div><div class="line">{</div><div class="line"> Identiconpp identicon(5, 5, Identiconpp::algorithm::ltr_symmetric,</div><div class="line"> &quot;ffffff80&quot;, { &quot;800000ff&quot; }, { 10, 10 });</div><div class="line"> Magick::Image img;</div><div class="line"> img = identicon.generate(&quot;55502f40dc8b7c769880b10874abc9d0&quot;, 200);</div><div class="line"> img.write(&quot;identicon.png&quot;);</div><div class="line"></div><div class="line"> std::cout &lt;&lt; identicon.generate_base64(&quot;png&quot;, &quot;5550&quot;, 200) &lt;&lt; std::endl;</div><div class="line">}</div></div><!-- fragment --><h3>C interface</h3>
<p>This is somewhat experimental. Have a look at <a href="https://schlomp.space/tastytea/identiconpp/src/branch/master/example.c">example.c</a> and <a href="https://doc.schlomp.space/identiconpp/identiconpp__c_8h.html">identiconpp_c.h</a>.</p>
<p>It seems to be impossible to use <code>Magick++</code> and <code>MagickWand</code> in the same library, so the images are returned as base64-encoded strings.</p>
<h2>Install</h2>