This file is indexed.

/usr/share/doc/libjuce/apiref/classRSAKey.html is in libjuce-doc 4.3.0~repack-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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JUCE: RSAKey Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">JUCE
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<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-attribs">Protected Attributes</a> &#124;
<a href="classRSAKey-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">RSAKey Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>RSA public/private key-pair encryption class.  
 <a href="classRSAKey.html#details">More...</a></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:a2a1894882100da6c8c70f8911089ef4d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#a2a1894882100da6c8c70f8911089ef4d">RSAKey</a> ()</td></tr>
<tr class="memdesc:a2a1894882100da6c8c70f8911089ef4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a null key object.  <a href="#a2a1894882100da6c8c70f8911089ef4d">More...</a><br /></td></tr>
<tr class="separator:a2a1894882100da6c8c70f8911089ef4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8658a7cfe77c3565033efbd6706ee6ae"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#a8658a7cfe77c3565033efbd6706ee6ae">RSAKey</a> (const <a class="el" href="classString.html">String</a> &amp;stringRepresentation)</td></tr>
<tr class="memdesc:a8658a7cfe77c3565033efbd6706ee6ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads a key from an encoded string representation.  <a href="#a8658a7cfe77c3565033efbd6706ee6ae">More...</a><br /></td></tr>
<tr class="separator:a8658a7cfe77c3565033efbd6706ee6ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ae206fafb656769aaea335383a4ffec"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#a4ae206fafb656769aaea335383a4ffec">~RSAKey</a> ()</td></tr>
<tr class="memdesc:a4ae206fafb656769aaea335383a4ffec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a4ae206fafb656769aaea335383a4ffec">More...</a><br /></td></tr>
<tr class="separator:a4ae206fafb656769aaea335383a4ffec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55cc9849996cb7b296ddf58f412113e4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#a55cc9849996cb7b296ddf58f412113e4">operator==</a> (const <a class="el" href="classRSAKey.html">RSAKey</a> &amp;other) const noexcept</td></tr>
<tr class="separator:a55cc9849996cb7b296ddf58f412113e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65d813bd3797f247f969714354158c7c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#a65d813bd3797f247f969714354158c7c">operator!=</a> (const <a class="el" href="classRSAKey.html">RSAKey</a> &amp;other) const noexcept</td></tr>
<tr class="separator:a65d813bd3797f247f969714354158c7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab48f11797337738028daf6e6997c7e22"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classString.html">String</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#ab48f11797337738028daf6e6997c7e22">toString</a> () const</td></tr>
<tr class="memdesc:ab48f11797337738028daf6e6997c7e22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Turns the key into a string representation.  <a href="#ab48f11797337738028daf6e6997c7e22">More...</a><br /></td></tr>
<tr class="separator:ab48f11797337738028daf6e6997c7e22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a898ca7521354c74d24ace4689b983f98"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#a898ca7521354c74d24ace4689b983f98">isValid</a> () const noexcept</td></tr>
<tr class="memdesc:a898ca7521354c74d24ace4689b983f98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the object is a valid key, or false if it was created by the default constructor.  <a href="#a898ca7521354c74d24ace4689b983f98">More...</a><br /></td></tr>
<tr class="separator:a898ca7521354c74d24ace4689b983f98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71507d7a01f767e2734b7038e1356568"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#a71507d7a01f767e2734b7038e1356568">applyToValue</a> (<a class="el" href="classBigInteger.html">BigInteger</a> &amp;value) const</td></tr>
<tr class="memdesc:a71507d7a01f767e2734b7038e1356568"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encodes or decodes a value.  <a href="#a71507d7a01f767e2734b7038e1356568">More...</a><br /></td></tr>
<tr class="separator:a71507d7a01f767e2734b7038e1356568"><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:a8d69fca3bd9748a5c455f92f6da0dc6a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#a8d69fca3bd9748a5c455f92f6da0dc6a">createKeyPair</a> (<a class="el" href="classRSAKey.html">RSAKey</a> &amp;publicKey, <a class="el" href="classRSAKey.html">RSAKey</a> &amp;privateKey, int numBits, const int *randomSeeds=nullptr, int numRandomSeeds=0)</td></tr>
<tr class="memdesc:a8d69fca3bd9748a5c455f92f6da0dc6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a public/private key-pair.  <a href="#a8d69fca3bd9748a5c455f92f6da0dc6a">More...</a><br /></td></tr>
<tr class="separator:a8d69fca3bd9748a5c455f92f6da0dc6a"><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:af9992df31573da04eff2f95b6c215be1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classBigInteger.html">BigInteger</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#af9992df31573da04eff2f95b6c215be1">part1</a></td></tr>
<tr class="separator:af9992df31573da04eff2f95b6c215be1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f404bb892955099f1495922fe43e0f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classBigInteger.html">BigInteger</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRSAKey.html#a8f404bb892955099f1495922fe43e0f8">part2</a></td></tr>
<tr class="separator:a8f404bb892955099f1495922fe43e0f8"><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>RSA public/private key-pair encryption class. </p>
<p>An object of this type makes up one half of a public/private RSA key pair. Use the <a class="el" href="classRSAKey.html#a8d69fca3bd9748a5c455f92f6da0dc6a" title="Creates a public/private key-pair. ">createKeyPair()</a> method to create a matching pair for encoding/decoding.</p>
<p>If you need to use this class in conjunction with a compatible enc/decryption algorithm on a webserver, you can achieve the same thing in PHP like this:</p>
<div class="fragment"><div class="line">include (<span class="stringliteral">&#39;Math/BigInteger.php&#39;</span>);  <span class="comment">// get this from: phpseclib.sourceforge.net</span></div><div class="line"></div><div class="line"><span class="keyword">function</span> <a class="code" href="classRSAKey.html#a71507d7a01f767e2734b7038e1356568">applyToValue</a> ($message, $key_part1, $key_part2)</div><div class="line">{</div><div class="line">    $result = <span class="keyword">new</span> Math_BigInteger();</div><div class="line">    $zero  = <span class="keyword">new</span> Math_BigInteger();</div><div class="line">    $value = <span class="keyword">new</span> Math_BigInteger (strrev ($message), 256);</div><div class="line">    $part1 = <span class="keyword">new</span> Math_BigInteger ($key_part1, 16);</div><div class="line">    $part2 = <span class="keyword">new</span> Math_BigInteger ($key_part2, 16);</div><div class="line"></div><div class="line">    <span class="keywordflow">while</span> (! $value-&gt;equals ($zero))</div><div class="line">    {</div><div class="line">        $result = $result-&gt;multiply ($part2);</div><div class="line">        list ($value, $remainder) = $value-&gt;divide ($part2);</div><div class="line">        $result = $result-&gt;add ($remainder-&gt;modPow ($part1, $part2));</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordflow">return</span> strrev ($result-&gt;toBytes());</div><div class="line">}</div></div><!-- fragment --><p>..or in Java with something like this:</p>
<div class="fragment"><div class="line"><span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classRSAKey.html">RSAKey</a></div><div class="line">{</div><div class="line">    <span class="keyword">static</span> <a class="code" href="classBigInteger.html">BigInteger</a> <a class="code" href="classRSAKey.html#a71507d7a01f767e2734b7038e1356568">applyToValue</a> (<a class="code" href="classBigInteger.html">BigInteger</a> value, <a class="code" href="classString.html">String</a> key_part1, <a class="code" href="classString.html">String</a> key_part2)</div><div class="line">    {</div><div class="line">        <a class="code" href="classBigInteger.html">BigInteger</a> result = <a class="code" href="classBigInteger.html">BigInteger</a>.ZERO;</div><div class="line">        <a class="code" href="classBigInteger.html">BigInteger</a> <a class="code" href="classRSAKey.html#af9992df31573da04eff2f95b6c215be1">part1</a> = <span class="keyword">new</span> <a class="code" href="classBigInteger.html">BigInteger</a> (key_part1, 16);</div><div class="line">        <a class="code" href="classBigInteger.html">BigInteger</a> <a class="code" href="classRSAKey.html#a8f404bb892955099f1495922fe43e0f8">part2</a> = <span class="keyword">new</span> <a class="code" href="classBigInteger.html">BigInteger</a> (key_part2, 16);</div><div class="line"></div><div class="line">        <span class="keywordflow">if</span> (part1.equals (<a class="code" href="classBigInteger.html">BigInteger</a>.ZERO) || part2.equals (<a class="code" href="classBigInteger.html">BigInteger</a>.ZERO)</div><div class="line">             || value.compareTo (<a class="code" href="classBigInteger.html">BigInteger</a>.ZERO) &lt;= 0)</div><div class="line">            <span class="keywordflow">return</span> result;</div><div class="line"></div><div class="line">        <span class="keywordflow">while</span> (! value.equals (<a class="code" href="classBigInteger.html">BigInteger</a>.ZERO))</div><div class="line">        {</div><div class="line">            result = result.multiply (part2);</div><div class="line">            <a class="code" href="classBigInteger.html">BigInteger</a>[] div = value.divideAndRemainder (part2);</div><div class="line">            value = div[0];</div><div class="line">            result = result.add (div[1].modPow (part1, part2));</div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="keywordflow">return</span> result;</div><div class="line">    }</div><div class="line">}</div></div><!-- fragment --><p>Disclaimer: neither of the code snippets above are tested! Please let me know if you have any corrections for them! </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2a1894882100da6c8c70f8911089ef4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a1894882100da6c8c70f8911089ef4d">&sect;&nbsp;</a></span>RSAKey() <span class="overload">[1/2]</span></h2>

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

<p>Creates a null key object. </p>
<p>Initialise a pair of objects for use with the <a class="el" href="classRSAKey.html#a8d69fca3bd9748a5c455f92f6da0dc6a" title="Creates a public/private key-pair. ">createKeyPair()</a> method. </p>

</div>
</div>
<a id="a8658a7cfe77c3565033efbd6706ee6ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8658a7cfe77c3565033efbd6706ee6ae">&sect;&nbsp;</a></span>RSAKey() <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">RSAKey::RSAKey </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classString.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>stringRepresentation</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>Loads a key from an encoded string representation. </p>
<p>This reloads a key from a string created by the <a class="el" href="classRSAKey.html#ab48f11797337738028daf6e6997c7e22" title="Turns the key into a string representation. ">toString()</a> method. </p>

</div>
</div>
<a id="a4ae206fafb656769aaea335383a4ffec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ae206fafb656769aaea335383a4ffec">&sect;&nbsp;</a></span>~RSAKey()</h2>

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

<p>Destructor. </p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool RSAKey::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classRSAKey.html">RSAKey</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a65d813bd3797f247f969714354158c7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65d813bd3797f247f969714354158c7c">&sect;&nbsp;</a></span>operator!=()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool RSAKey::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classRSAKey.html">RSAKey</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ab48f11797337738028daf6e6997c7e22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab48f11797337738028daf6e6997c7e22">&sect;&nbsp;</a></span>toString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classString.html">String</a> RSAKey::toString </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Turns the key into a string representation. </p>
<p>This can be reloaded using the constructor that takes a string. </p>

</div>
</div>
<a id="a898ca7521354c74d24ace4689b983f98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a898ca7521354c74d24ace4689b983f98">&sect;&nbsp;</a></span>isValid()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool RSAKey::isValid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns true if the object is a valid key, or false if it was created by the default constructor. </p>

</div>
</div>
<a id="a71507d7a01f767e2734b7038e1356568"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71507d7a01f767e2734b7038e1356568">&sect;&nbsp;</a></span>applyToValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool RSAKey::applyToValue </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classBigInteger.html">BigInteger</a> &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encodes or decodes a value. </p>
<p>Call this on the public key object to encode some data, then use the matching private key object to decode it.</p>
<p>Returns false if the operation couldn't be completed, e.g. if this key hasn't been initialised correctly.</p>
<p>NOTE: This method dumbly applies this key to this data. If you encode some data and then try to decode it with a key that doesn't match, this method will still happily do its job and return true, but the result won't be what you were expecting. It's your responsibility to check that the result is what you wanted. </p>

</div>
</div>
<a id="a8d69fca3bd9748a5c455f92f6da0dc6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d69fca3bd9748a5c455f92f6da0dc6a">&sect;&nbsp;</a></span>createKeyPair()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void RSAKey::createKeyPair </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classRSAKey.html">RSAKey</a> &amp;&#160;</td>
          <td class="paramname"><em>publicKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classRSAKey.html">RSAKey</a> &amp;&#160;</td>
          <td class="paramname"><em>privateKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numBits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>randomSeeds</em> = <code>nullptr</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numRandomSeeds</em> = <code>0</code>&#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>Creates a public/private key-pair. </p>
<p>Each key will perform one-way encryption that can only be reversed by using the other key.</p>
<p>The numBits parameter specifies the size of key, e.g. 128, 256, 512 bit. Bigger sizes are more secure, but this method will take longer to execute.</p>
<p>The randomSeeds parameter lets you optionally pass it a set of values with which to seed the random number generation, improving the security of the keys generated. If you supply these, make sure you provide more than 2 values, and the more your provide, the better the security. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="af9992df31573da04eff2f95b6c215be1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9992df31573da04eff2f95b6c215be1">&sect;&nbsp;</a></span>part1</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="classBigInteger.html">BigInteger</a> RSAKey::part1</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a8f404bb892955099f1495922fe43e0f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8f404bb892955099f1495922fe43e0f8">&sect;&nbsp;</a></span>part2</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="classBigInteger.html">BigInteger</a> RSAKey::part2</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__RSAKey_8h.html">juce_RSAKey.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content &copy ROLI Ltd.</small></address><br/>
</body>
</html>