This file is indexed.

/usr/share/doc/libstaroffice/html/classStarEncryption.html is in libstaroffice-doc 0.0.5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>StarEncryption Class Reference documentation</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classStarEncryption.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classStarEncryption-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">StarEncryption Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>the main class to read/.  
 <a href="classStarEncryption.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="StarEncryption_8hxx_source.html">StarEncryption.hxx</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8ed4725417e970ea089625bf8f42fa43"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#a8ed4725417e970ea089625bf8f42fa43">StarEncryption</a> ()</td></tr>
<tr class="memdesc:a8ed4725417e970ea089625bf8f42fa43"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor  <a href="#a8ed4725417e970ea089625bf8f42fa43">More...</a><br /></td></tr>
<tr class="separator:a8ed4725417e970ea089625bf8f42fa43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a107701060c680f0c61558c385ff598b6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#a107701060c680f0c61558c385ff598b6">StarEncryption</a> (std::string const &amp;password)</td></tr>
<tr class="memdesc:a107701060c680f0c61558c385ff598b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor knowing the original password  <a href="#a107701060c680f0c61558c385ff598b6">More...</a><br /></td></tr>
<tr class="separator:a107701060c680f0c61558c385ff598b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a777fe14b0f5e06dbd1edbb4b29b35274"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#a777fe14b0f5e06dbd1edbb4b29b35274">~StarEncryption</a> ()</td></tr>
<tr class="memdesc:a777fe14b0f5e06dbd1edbb4b29b35274"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructor  <a href="#a777fe14b0f5e06dbd1edbb4b29b35274">More...</a><br /></td></tr>
<tr class="separator:a777fe14b0f5e06dbd1edbb4b29b35274"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b4f467eba4a298221add9eb603f5036"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#a7b4f467eba4a298221add9eb603f5036">decode</a> (std::vector&lt; uint8_t &gt; &amp;data) const</td></tr>
<tr class="memdesc:a7b4f467eba4a298221add9eb603f5036"><td class="mdescLeft">&#160;</td><td class="mdescRight">decodes a string  <a href="#a7b4f467eba4a298221add9eb603f5036">More...</a><br /></td></tr>
<tr class="separator:a7b4f467eba4a298221add9eb603f5036"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69e1bbc855ddf7951216116f390387be"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#a69e1bbc855ddf7951216116f390387be">checkPassword</a> (uint32_t date, uint32_t time, std::vector&lt; uint8_t &gt; const &amp;cryptDateTime) const</td></tr>
<tr class="memdesc:a69e1bbc855ddf7951216116f390387be"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks that the password is correct  <a href="#a69e1bbc855ddf7951216116f390387be">More...</a><br /></td></tr>
<tr class="separator:a69e1bbc855ddf7951216116f390387be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf77ac1e42e4b2533f866e832409e61c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#adf77ac1e42e4b2533f866e832409e61c">guessPassword</a> (uint32_t date, uint32_t time, std::vector&lt; uint8_t &gt; const &amp;cryptDateTime)</td></tr>
<tr class="memdesc:adf77ac1e42e4b2533f866e832409e61c"><td class="mdescLeft">&#160;</td><td class="mdescRight">tries to guess the password, assuming that the user's password has at most 15 characters.  <a href="#adf77ac1e42e4b2533f866e832409e61c">More...</a><br /></td></tr>
<tr class="separator:adf77ac1e42e4b2533f866e832409e61c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:afe090eaf6c3e4712f827513787d76e3e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="libstaroffice__internal_8hxx.html#a9a3f1ff5fbf318034ef6ef3be2c53f48">STOFFInputStreamPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#afe090eaf6c3e4712f827513787d76e3e">decodeStream</a> (<a class="el" href="libstaroffice__internal_8hxx.html#a9a3f1ff5fbf318034ef6ef3be2c53f48">STOFFInputStreamPtr</a> input, uint8_t mask)</td></tr>
<tr class="memdesc:afe090eaf6c3e4712f827513787d76e3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">decode a zone given a mask  <a href="#afe090eaf6c3e4712f827513787d76e3e">More...</a><br /></td></tr>
<tr class="separator:afe090eaf6c3e4712f827513787d76e3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a190f38b436532ba4b851b1db6e867f"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#a1a190f38b436532ba4b851b1db6e867f">getMaskToDecodeStream</a> (uint8_t src, uint8_t dest)</td></tr>
<tr class="memdesc:a1a190f38b436532ba4b851b1db6e867f"><td class="mdescLeft">&#160;</td><td class="mdescRight">retrieves a mask needed to decode a stream knowing a src and dest bytes  <a href="#a1a190f38b436532ba4b851b1db6e867f">More...</a><br /></td></tr>
<tr class="separator:a1a190f38b436532ba4b851b1db6e867f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:ad688148227362e91db38339b78458bd8"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#ad688148227362e91db38339b78458bd8">decode</a> (std::vector&lt; uint8_t &gt; &amp;data, std::vector&lt; uint8_t &gt; const &amp;cryptPasswd)</td></tr>
<tr class="memdesc:ad688148227362e91db38339b78458bd8"><td class="mdescLeft">&#160;</td><td class="mdescRight">decodes a string  <a href="#ad688148227362e91db38339b78458bd8">More...</a><br /></td></tr>
<tr class="separator:ad688148227362e91db38339b78458bd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac173c659f66fde1adf786ffec09538f4"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#ac173c659f66fde1adf786ffec09538f4">findEncryptedPassword</a> (std::vector&lt; uint8_t &gt; const &amp;src, std::vector&lt; uint8_t &gt; const &amp;dest, uint8_t c0c1, std::vector&lt; uint8_t &gt; &amp;crypter)</td></tr>
<tr class="memdesc:ac173c659f66fde1adf786ffec09538f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">try to find the crypter knowing the original data(16 bytes), the final data(16 bytes) and the value of c0+c1  <a href="#ac173c659f66fde1adf786ffec09538f4">More...</a><br /></td></tr>
<tr class="separator:ac173c659f66fde1adf786ffec09538f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aadc1a0f2c5c7e02c6abcfd7c2c16f5f8"><td class="memItemLeft" align="right" valign="top">std::vector&lt; uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStarEncryption.html#aadc1a0f2c5c7e02c6abcfd7c2c16f5f8">m_password</a></td></tr>
<tr class="memdesc:aadc1a0f2c5c7e02c6abcfd7c2c16f5f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">the crypted password  <a href="#aadc1a0f2c5c7e02c6abcfd7c2c16f5f8">More...</a><br /></td></tr>
<tr class="separator:aadc1a0f2c5c7e02c6abcfd7c2c16f5f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>the main class to read/. </p>
<p>. some basic encryption in StarOffice documents </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a8ed4725417e970ea089625bf8f42fa43"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ed4725417e970ea089625bf8f42fa43">&#9670;&nbsp;</a></span>StarEncryption() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StarEncryption::StarEncryption </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>constructor </p>

</div>
</div>
<a id="a107701060c680f0c61558c385ff598b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a107701060c680f0c61558c385ff598b6">&#9670;&nbsp;</a></span>StarEncryption() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">StarEncryption::StarEncryption </td>
          <td>(</td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>password</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>constructor knowing the original password </p>

</div>
</div>
<a id="a777fe14b0f5e06dbd1edbb4b29b35274"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a777fe14b0f5e06dbd1edbb4b29b35274">&#9670;&nbsp;</a></span>~StarEncryption()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">StarEncryption::~StarEncryption </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>destructor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a69e1bbc855ddf7951216116f390387be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69e1bbc855ddf7951216116f390387be">&#9670;&nbsp;</a></span>checkPassword()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool StarEncryption::checkPassword </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>date</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; uint8_t &gt; const &amp;&#160;</td>
          <td class="paramname"><em>cryptDateTime</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>checks that the password is correct </p>

<p class="reference">Referenced by <a class="el" href="classStarEncryption.html#a7b4f467eba4a298221add9eb603f5036">decode()</a>.</p>

</div>
</div>
<a id="a7b4f467eba4a298221add9eb603f5036"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b4f467eba4a298221add9eb603f5036">&#9670;&nbsp;</a></span>decode() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool StarEncryption::decode </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; uint8_t &gt; &amp;&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>decodes a string </p>

<p class="reference">Referenced by <a class="el" href="classStarEncryption.html#a69e1bbc855ddf7951216116f390387be">checkPassword()</a>, <a class="el" href="classStarEncryption.html#adf77ac1e42e4b2533f866e832409e61c">guessPassword()</a>, and <a class="el" href="classStarEncryption.html#a107701060c680f0c61558c385ff598b6">StarEncryption()</a>.</p>

</div>
</div>
<a id="ad688148227362e91db38339b78458bd8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad688148227362e91db38339b78458bd8">&#9670;&nbsp;</a></span>decode() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool StarEncryption::decode </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; uint8_t &gt; &amp;&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; uint8_t &gt; const &amp;&#160;</td>
          <td class="paramname"><em>cryptPasswd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>decodes a string </p>

</div>
</div>
<a id="afe090eaf6c3e4712f827513787d76e3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe090eaf6c3e4712f827513787d76e3e">&#9670;&nbsp;</a></span>decodeStream()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="libstaroffice__internal_8hxx.html#a9a3f1ff5fbf318034ef6ef3be2c53f48">STOFFInputStreamPtr</a> StarEncryption::decodeStream </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="libstaroffice__internal_8hxx.html#a9a3f1ff5fbf318034ef6ef3be2c53f48">STOFFInputStreamPtr</a>&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>decode a zone given a mask </p>

<p class="reference">Referenced by <a class="el" href="classStarEncryption.html#a7b4f467eba4a298221add9eb603f5036">decode()</a>, <a class="el" href="classStarObjectSpreadsheet.html#a5ecc8fbc4f73052f948467c9ed72a4fc">StarObjectSpreadsheet::readCalcDocument()</a>, and <a class="el" href="classStarObjectDraw.html#add6faf3cca52ce4e2c9d45aec4e1ff82">StarObjectDraw::readDrawDocument()</a>.</p>

</div>
</div>
<a id="ac173c659f66fde1adf786ffec09538f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac173c659f66fde1adf786ffec09538f4">&#9670;&nbsp;</a></span>findEncryptedPassword()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool StarEncryption::findEncryptedPassword </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; uint8_t &gt; const &amp;&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; uint8_t &gt; const &amp;&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c0c1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; uint8_t &gt; &amp;&#160;</td>
          <td class="paramname"><em>crypter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>try to find the crypter knowing the original data(16 bytes), the final data(16 bytes) and the value of c0+c1 </p>
<dl class="section note"><dt>Note</dt><dd>if we know the value of crypter[0]+crypter[1] (modulo 256), there is at most one potential candidate. So we compute it checking that crypter[0]+crypter[1] verifies the modulo relation. </dd></dl>

<p class="reference">Referenced by <a class="el" href="classStarEncryption.html#a7b4f467eba4a298221add9eb603f5036">decode()</a>, and <a class="el" href="classStarEncryption.html#adf77ac1e42e4b2533f866e832409e61c">guessPassword()</a>.</p>

</div>
</div>
<a id="a1a190f38b436532ba4b851b1db6e867f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a190f38b436532ba4b851b1db6e867f">&#9670;&nbsp;</a></span>getMaskToDecodeStream()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t StarEncryption::getMaskToDecodeStream </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dest</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>retrieves a mask needed to decode a stream knowing a src and dest bytes </p>
<dl class="section note"><dt>Note</dt><dd>given a passwd, SvStream creates a mask from the passwd and used it to decode a stream, thus we need only this mask for decoding a crypt stream.</dd></dl>
<p>Moreover as this method is used to crypt a StarCalcDocument stream, and we know that a valid StarCalcDocument stream must begin by XX42, we can easily retrieve the password mask and use it to uncrypt this stream... </p>

<p class="reference">Referenced by <a class="el" href="classStarEncryption.html#a7b4f467eba4a298221add9eb603f5036">decode()</a>, <a class="el" href="classStarObjectSpreadsheet.html#a5ecc8fbc4f73052f948467c9ed72a4fc">StarObjectSpreadsheet::readCalcDocument()</a>, and <a class="el" href="classStarObjectDraw.html#add6faf3cca52ce4e2c9d45aec4e1ff82">StarObjectDraw::readDrawDocument()</a>.</p>

</div>
</div>
<a id="adf77ac1e42e4b2533f866e832409e61c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf77ac1e42e4b2533f866e832409e61c">&#9670;&nbsp;</a></span>guessPassword()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool StarEncryption::guessPassword </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>date</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; uint8_t &gt; const &amp;&#160;</td>
          <td class="paramname"><em>cryptDateTime</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>tries to guess the password, assuming that the user's password has at most 15 characters. </p>
<dl class="section note"><dt>Note</dt><dd>if we know the date, the time and the encrypted date time string, there is at most 256 encrypted passwords which can correspond (in pratical case, I find about 10 potential candidates). So we loop over these potential encrypted passwords and recompute the original password to select the passwords which ends with more ' ' characters than the other one. We fail if we find no encrypted password or if we can not select an unique best canditate.</dd></dl>
<p>As the StarOffice's algorithm adds trailing spaces if the password does not contain 16 characters, this may give almost alway good result if the user has not chosen a password with 16 characters.</p>
<p>If we success, we store the encrypted password to be used for further encryption. </p>

<p class="reference">Referenced by <a class="el" href="classStarEncryption.html#a7b4f467eba4a298221add9eb603f5036">decode()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aadc1a0f2c5c7e02c6abcfd7c2c16f5f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadc1a0f2c5c7e02c6abcfd7c2c16f5f8">&#9670;&nbsp;</a></span>m_password</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;uint8_t&gt; StarEncryption::m_password</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>the crypted password </p>

<p class="reference">Referenced by <a class="el" href="classStarEncryption.html#a7b4f467eba4a298221add9eb603f5036">decode()</a>, <a class="el" href="classStarEncryption.html#adf77ac1e42e4b2533f866e832409e61c">guessPassword()</a>, and <a class="el" href="classStarEncryption.html#a107701060c680f0c61558c385ff598b6">StarEncryption()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="StarEncryption_8hxx_source.html">StarEncryption.hxx</a></li>
<li><a class="el" href="StarEncryption_8cxx.html">StarEncryption.cxx</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<hr size="1"><address style="align: right;"><small>
Generated on Wed Nov 8 2017 17:52:38 for libstaroffice by <a href="http://www.doxygen.org/index.html">
doxygen</a> 1.8.13</small></address>
</body>
</html>