~ubuntu-branches/ubuntu/wily/qca2/wily-proposed

« back to all changes in this revision

Viewing changes to qca/apidocs/html/classQCA_1_1Cipher.html

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2007-10-27 18:51:54 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20071027185154-4ir9ys3h2q9fofrw
Tags: 2.0.0-2
Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
 
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
 
<title>Qt Cryptographic Architecture: QCA::Cipher Class Reference</title>
4
 
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
 
<link href="tabs.css" rel="stylesheet" type="text/css">
6
 
</head><body>
7
 
<!-- Generated by Doxygen 1.4.6 -->
8
 
<div class="tabs">
9
 
  <ul>
10
 
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11
 
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
12
 
    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
13
 
    <li><a href="files.html"><span>Files</span></a></li>
14
 
    <li><a href="dirs.html"><span>Directories</span></a></li>
15
 
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
16
 
    <li><a href="examples.html"><span>Examples</span></a></li>
17
 
  </ul></div>
18
 
<div class="tabs">
19
 
  <ul>
20
 
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
21
 
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
22
 
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
23
 
  </ul></div>
24
 
<div class="nav">
25
 
<a class="el" href="namespaceQCA.html">QCA</a>::<a class="el" href="classQCA_1_1Cipher.html">Cipher</a></div>
26
 
<h1>QCA::Cipher Class Reference</h1><!-- doxytag: class="QCA::Cipher" --><!-- doxytag: inherits="QCA::Algorithm,QCA::Filter" -->General class for cipher (encryption / decryption) algorithms.  
27
 
<a href="#_details">More...</a>
28
 
<p>
29
 
<code>#include &lt;<a class="el" href="qca__basic_8h-source.html">QtCrypto</a>&gt;</code>
30
 
<p>
31
 
<p>Inheritance diagram for QCA::Cipher:
32
 
<p><center><img src="classQCA_1_1Cipher.png" usemap="#QCA::Cipher_map" border="0" alt=""></center>
33
 
<map name="QCA::Cipher_map">
34
 
<area href="classQCA_1_1Algorithm.html" alt="QCA::Algorithm" shape="rect" coords="0,0,99,24">
35
 
<area href="classQCA_1_1Filter.html" alt="QCA::Filter" shape="rect" coords="109,0,208,24">
36
 
</map>
37
 
Collaboration diagram for QCA::Cipher:<p><center><img src="classQCA_1_1Cipher__coll__graph.png" border="0" usemap="#QCA_1_1Cipher__coll__map" alt="Collaboration graph"></center>
38
 
<map name="QCA_1_1Cipher__coll__map">
39
 
<area href="classQCA_1_1Algorithm.html" shape="rect" coords="54,100,169,124" alt="">
40
 
<area doxygen="qt.tag:" href="qshareddatapointer.html" shape="rect" coords="7,9,215,33" alt="">
41
 
<area href="classQCA_1_1Filter.html" shape="rect" coords="193,100,281,124" alt="">
42
 
</map>
43
 
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classQCA_1_1Cipher-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
44
 
<tr><td></td></tr>
45
 
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
46
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b">Mode</a> { <a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b86eb7f24db68cab4954bac608b6df0f8">CBC</a>, 
47
 
<a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b48a41672676d0f44d494331f31eb08f6">CFB</a>, 
48
 
<a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b2242c6ac6d37ac39d20d85486b113dbb">ECB</a>, 
49
 
<a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b3cf1ddcbb9543e64c9b70bdf75d2da20">OFB</a>
50
 
 }</td></tr>
51
 
 
52
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b">Padding</a> { <a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b402325f324be592311fcfe5ea0526747">DefaultPadding</a>, 
53
 
<a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b14576feb70dce92f2ce3bc0143742866">NoPadding</a>, 
54
 
<a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52bef40f7173d895c7ae1a32625cd3eef3b">PKCS7</a>
55
 
 }</td></tr>
56
 
 
57
 
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
58
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#9ed78ff1f6d3e9b9ed1d8eebdb7540e3">Cipher</a> (const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> &amp;type, <a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b">Mode</a> mode, <a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b">Padding</a> pad=DefaultPadding, <a class="el" href="namespaceQCA.html#8e5d1994b00ea69c9a598f93cd0990ce">Direction</a> dir=Encode, const <a class="el" href="classQCA_1_1SymmetricKey.html">SymmetricKey</a> &amp;key=<a class="el" href="classQCA_1_1SymmetricKey.html">SymmetricKey</a>(), const <a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a> &amp;iv=<a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a>(), const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> &amp;provider=<a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a>())</td></tr>
59
 
 
60
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#bec28c3a9dd07c57f7878d0e036d3ab6">Cipher</a> (const <a class="el" href="classQCA_1_1Cipher.html">Cipher</a> &amp;from)</td></tr>
61
 
 
62
 
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classQCA_1_1Cipher.html">Cipher</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#3a3562c8db00240c37fdb59519ce37fa">operator=</a> (const <a class="el" href="classQCA_1_1Cipher.html">Cipher</a> &amp;from)</td></tr>
63
 
 
64
 
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#f5f60cff34b3d194878dc720c2772f56">type</a> () const </td></tr>
65
 
 
66
 
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b">Mode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#01c2511aed6f31a0f676f84d7a3f0cd7">mode</a> () const </td></tr>
67
 
 
68
 
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b">Padding</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#a1a3f7287378c34d627540cab7a2bf01">padding</a> () const </td></tr>
69
 
 
70
 
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceQCA.html#8e5d1994b00ea69c9a598f93cd0990ce">Direction</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#cf1992168fae016c5f7531a4ee757de8">direction</a> () const </td></tr>
71
 
 
72
 
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classQCA_1_1KeyLength.html">KeyLength</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#2a4e19ab0ea7d8fc52e9c3d2f84aab02">keyLength</a> () const </td></tr>
73
 
 
74
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#1a0f3bb31878baceb8c9bd7718f2c3d6">validKeyLength</a> (int n) const </td></tr>
75
 
 
76
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#c7d30a5ccf512e0625e307a10aebf6e1">blockSize</a> () const </td></tr>
77
 
 
78
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#6c51f4e2583e779e3793113c2b397a4f">clear</a> ()</td></tr>
79
 
 
80
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classQCA_1_1MemoryRegion.html">MemoryRegion</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#a730707a1fb3fef1f3d02b4afcfacab2">update</a> (const <a class="el" href="classQCA_1_1MemoryRegion.html">MemoryRegion</a> &amp;a)</td></tr>
81
 
 
82
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classQCA_1_1MemoryRegion.html">MemoryRegion</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#bdab1417eb8dc7e8dd16d94ce031b490">final</a> ()</td></tr>
83
 
 
84
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#12dae396f29a4241c13fb6f35489574f">ok</a> () const </td></tr>
85
 
 
86
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#69b2257eeeacc4ff01166a45a662e8c7">setup</a> (<a class="el" href="namespaceQCA.html#8e5d1994b00ea69c9a598f93cd0990ce">Direction</a> dir, const <a class="el" href="classQCA_1_1SymmetricKey.html">SymmetricKey</a> &amp;key, const <a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a> &amp;iv=<a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a>())</td></tr>
87
 
 
88
 
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
89
 
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCA_1_1Cipher.html#9be656582ff71957adbddf5ebabeb031">withAlgorithms</a> (const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> &amp;cipherType, <a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b">Mode</a> modeType, <a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b">Padding</a> paddingType)</td></tr>
90
 
 
91
 
</table>
92
 
<hr><a name="_details"></a><h2>Detailed Description</h2>
93
 
General class for cipher (encryption / decryption) algorithms. 
94
 
<p>
95
 
<a class="el" href="classQCA_1_1Cipher.html">Cipher</a> is the class for the various algorithms that perform low level encryption and decryption within QCA.<p>
96
 
AES128, AES192 and AES256 are recommended for new applications.<p>
97
 
Standard names for ciphers are:<ul>
98
 
<li>Blowfish - "blowfish"</li><li>TripleDES - "tripledes"</li><li>DES - "des"</li><li>AES128 - "aes128"</li><li>AES192 - "aes192"</li><li>AES256 - "aes256" </li></ul>
99
 
<dl compact><dt><b>Examples: </b></dt><dd>
100
 
 
101
 
<p>
102
 
<a class="el" href="aes-cmac_8cpp-example.html#_a3">aes-cmac.cpp</a>, and <a class="el" href="ciphertest_8cpp-example.html#_a54">ciphertest.cpp</a>.</dl>
103
 
<p>
104
 
<hr><h2>Member Enumeration Documentation</h2>
105
 
<a class="anchor" name="55df34874dc7565d7de238d2d742d66b"></a><!-- doxytag: member="QCA::Cipher::Mode" ref="55df34874dc7565d7de238d2d742d66b" args="" --><p>
106
 
<table class="mdTable" cellpadding="2" cellspacing="0">
107
 
  <tr>
108
 
    <td class="mdRow">
109
 
      <table cellpadding="0" cellspacing="0" border="0">
110
 
        <tr>
111
 
          <td class="md" nowrap valign="top">enum <a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b">QCA::Cipher::Mode</a>          </td>
112
 
        </tr>
113
 
      </table>
114
 
    </td>
115
 
  </tr>
116
 
</table>
117
 
<table cellspacing="5" cellpadding="0" border="0">
118
 
  <tr>
119
 
    <td>
120
 
      &nbsp;
121
 
    </td>
122
 
    <td>
123
 
 
124
 
<p>
125
 
Mode settings for cipher algorithms. 
126
 
<p>
127
 
<dl compact><dt><b>Enumerator: </b></dt><dd>
128
 
<table border="0" cellspacing="2" cellpadding="0">
129
 
<tr><td valign="top"><em><a class="anchor" name="55df34874dc7565d7de238d2d742d66b86eb7f24db68cab4954bac608b6df0f8"></a><!-- doxytag: member="CBC" ref="55df34874dc7565d7de238d2d742d66b86eb7f24db68cab4954bac608b6df0f8" args="" -->CBC</em>&nbsp;</td><td>
130
 
operate in Cipher Block Chaining mode </td></tr>
131
 
<tr><td valign="top"><em><a class="anchor" name="55df34874dc7565d7de238d2d742d66b48a41672676d0f44d494331f31eb08f6"></a><!-- doxytag: member="CFB" ref="55df34874dc7565d7de238d2d742d66b48a41672676d0f44d494331f31eb08f6" args="" -->CFB</em>&nbsp;</td><td>
132
 
operate in Cipher FeedBack mode </td></tr>
133
 
<tr><td valign="top"><em><a class="anchor" name="55df34874dc7565d7de238d2d742d66b2242c6ac6d37ac39d20d85486b113dbb"></a><!-- doxytag: member="ECB" ref="55df34874dc7565d7de238d2d742d66b2242c6ac6d37ac39d20d85486b113dbb" args="" -->ECB</em>&nbsp;</td><td>
134
 
operate in Electronic Code Book mode </td></tr>
135
 
<tr><td valign="top"><em><a class="anchor" name="55df34874dc7565d7de238d2d742d66b3cf1ddcbb9543e64c9b70bdf75d2da20"></a><!-- doxytag: member="OFB" ref="55df34874dc7565d7de238d2d742d66b3cf1ddcbb9543e64c9b70bdf75d2da20" args="" -->OFB</em>&nbsp;</td><td>
136
 
operate in Output FeedBack Mode </td></tr>
137
 
</table>
138
 
</dl>
139
 
    </td>
140
 
  </tr>
141
 
</table>
142
 
<a class="anchor" name="eafc444370fbd6d1457580da2f00c52b"></a><!-- doxytag: member="QCA::Cipher::Padding" ref="eafc444370fbd6d1457580da2f00c52b" args="" --><p>
143
 
<table class="mdTable" cellpadding="2" cellspacing="0">
144
 
  <tr>
145
 
    <td class="mdRow">
146
 
      <table cellpadding="0" cellspacing="0" border="0">
147
 
        <tr>
148
 
          <td class="md" nowrap valign="top">enum <a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b">QCA::Cipher::Padding</a>          </td>
149
 
        </tr>
150
 
      </table>
151
 
    </td>
152
 
  </tr>
153
 
</table>
154
 
<table cellspacing="5" cellpadding="0" border="0">
155
 
  <tr>
156
 
    <td>
157
 
      &nbsp;
158
 
    </td>
159
 
    <td>
160
 
 
161
 
<p>
162
 
Padding variations for cipher algorithms. 
163
 
<p>
164
 
<dl compact><dt><b>Enumerator: </b></dt><dd>
165
 
<table border="0" cellspacing="2" cellpadding="0">
166
 
<tr><td valign="top"><em><a class="anchor" name="eafc444370fbd6d1457580da2f00c52b402325f324be592311fcfe5ea0526747"></a><!-- doxytag: member="DefaultPadding" ref="eafc444370fbd6d1457580da2f00c52b402325f324be592311fcfe5ea0526747" args="" -->DefaultPadding</em>&nbsp;</td><td>
167
 
Default for cipher-mode. </td></tr>
168
 
<tr><td valign="top"><em><a class="anchor" name="eafc444370fbd6d1457580da2f00c52b14576feb70dce92f2ce3bc0143742866"></a><!-- doxytag: member="NoPadding" ref="eafc444370fbd6d1457580da2f00c52b14576feb70dce92f2ce3bc0143742866" args="" -->NoPadding</em>&nbsp;</td><td>
169
 
Do not use padding. </td></tr>
170
 
<tr><td valign="top"><em><a class="anchor" name="eafc444370fbd6d1457580da2f00c52bef40f7173d895c7ae1a32625cd3eef3b"></a><!-- doxytag: member="PKCS7" ref="eafc444370fbd6d1457580da2f00c52bef40f7173d895c7ae1a32625cd3eef3b" args="" -->PKCS7</em>&nbsp;</td><td>
171
 
Pad using the scheme in PKCS#7. </td></tr>
172
 
</table>
173
 
</dl>
174
 
    </td>
175
 
  </tr>
176
 
</table>
177
 
<hr><h2>Constructor &amp; Destructor Documentation</h2>
178
 
<a class="anchor" name="9ed78ff1f6d3e9b9ed1d8eebdb7540e3"></a><!-- doxytag: member="QCA::Cipher::Cipher" ref="9ed78ff1f6d3e9b9ed1d8eebdb7540e3" args="(const QString &amp;type, Mode mode, Padding pad=DefaultPadding, Direction dir=Encode, const SymmetricKey &amp;key=SymmetricKey(), const InitializationVector &amp;iv=InitializationVector(), const QString &amp;provider=QString())" --><p>
179
 
<table class="mdTable" cellpadding="2" cellspacing="0">
180
 
  <tr>
181
 
    <td class="mdRow">
182
 
      <table cellpadding="0" cellspacing="0" border="0">
183
 
        <tr>
184
 
          <td class="md" nowrap valign="top">QCA::Cipher::Cipher           </td>
185
 
          <td class="md" valign="top">(&nbsp;</td>
186
 
          <td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> &amp;&nbsp;</td>
187
 
          <td class="mdname" nowrap> <em>type</em>, </td>
188
 
        </tr>
189
 
        <tr>
190
 
          <td class="md" nowrap align="right"></td>
191
 
          <td class="md"></td>
192
 
          <td class="md" nowrap><a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b">Mode</a>&nbsp;</td>
193
 
          <td class="mdname" nowrap> <em>mode</em>, </td>
194
 
        </tr>
195
 
        <tr>
196
 
          <td class="md" nowrap align="right"></td>
197
 
          <td class="md"></td>
198
 
          <td class="md" nowrap><a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b">Padding</a>&nbsp;</td>
199
 
          <td class="mdname" nowrap> <em>pad</em> = <code>DefaultPadding</code>, </td>
200
 
        </tr>
201
 
        <tr>
202
 
          <td class="md" nowrap align="right"></td>
203
 
          <td class="md"></td>
204
 
          <td class="md" nowrap><a class="el" href="namespaceQCA.html#8e5d1994b00ea69c9a598f93cd0990ce">Direction</a>&nbsp;</td>
205
 
          <td class="mdname" nowrap> <em>dir</em> = <code>Encode</code>, </td>
206
 
        </tr>
207
 
        <tr>
208
 
          <td class="md" nowrap align="right"></td>
209
 
          <td class="md"></td>
210
 
          <td class="md" nowrap>const <a class="el" href="classQCA_1_1SymmetricKey.html">SymmetricKey</a> &amp;&nbsp;</td>
211
 
          <td class="mdname" nowrap> <em>key</em> = <code><a class="el" href="classQCA_1_1SymmetricKey.html">SymmetricKey</a>()</code>, </td>
212
 
        </tr>
213
 
        <tr>
214
 
          <td class="md" nowrap align="right"></td>
215
 
          <td class="md"></td>
216
 
          <td class="md" nowrap>const <a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a> &amp;&nbsp;</td>
217
 
          <td class="mdname" nowrap> <em>iv</em> = <code><a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a>()</code>, </td>
218
 
        </tr>
219
 
        <tr>
220
 
          <td class="md" nowrap align="right"></td>
221
 
          <td class="md"></td>
222
 
          <td class="md" nowrap>const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> &amp;&nbsp;</td>
223
 
          <td class="mdname" nowrap> <em>provider</em> = <code><a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a>()</code></td>
224
 
        </tr>
225
 
        <tr>
226
 
          <td class="md"></td>
227
 
          <td class="md">)&nbsp;</td>
228
 
          <td class="md" colspan="2"></td>
229
 
        </tr>
230
 
      </table>
231
 
    </td>
232
 
  </tr>
233
 
</table>
234
 
<table cellspacing="5" cellpadding="0" border="0">
235
 
  <tr>
236
 
    <td>
237
 
      &nbsp;
238
 
    </td>
239
 
    <td>
240
 
 
241
 
<p>
242
 
Standard constructor. 
243
 
<p>
244
 
<dl compact><dt><b>Parameters:</b></dt><dd>
245
 
  <table border="0" cellspacing="2" cellpadding="0">
246
 
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>the name of the cipher specialisation to use (e.g. "aes128") </td></tr>
247
 
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>the operating Mode to use (e.g. <a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b86eb7f24db68cab4954bac608b6df0f8">QCA::Cipher::CBC</a>) </td></tr>
248
 
    <tr><td valign="top"></td><td valign="top"><em>pad</em>&nbsp;</td><td>the type of Padding to use </td></tr>
249
 
    <tr><td valign="top"></td><td valign="top"><em>dir</em>&nbsp;</td><td>the Direction that this <a class="el" href="classQCA_1_1Cipher.html">Cipher</a> should use (Encode for encryption, Decode for decryption) </td></tr>
250
 
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>the <a class="el" href="classQCA_1_1SymmetricKey.html">SymmetricKey</a> array that is the key </td></tr>
251
 
    <tr><td valign="top"></td><td valign="top"><em>iv</em>&nbsp;</td><td>the <a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a> to use (not used for ECB mode) </td></tr>
252
 
    <tr><td valign="top"></td><td valign="top"><em>provider</em>&nbsp;</td><td>the name of the <a class="el" href="classQCA_1_1Provider.html">Provider</a> to use</td></tr>
253
 
  </table>
254
 
</dl>
255
 
<dl compact><dt><b>Note:</b></dt><dd>Padding only applies to CBC and ECB modes. CFB and OFB ciphertext is always the length of the plaintext. </dd></dl>
256
 
    </td>
257
 
  </tr>
258
 
</table>
259
 
<a class="anchor" name="bec28c3a9dd07c57f7878d0e036d3ab6"></a><!-- doxytag: member="QCA::Cipher::Cipher" ref="bec28c3a9dd07c57f7878d0e036d3ab6" args="(const Cipher &amp;from)" --><p>
260
 
<table class="mdTable" cellpadding="2" cellspacing="0">
261
 
  <tr>
262
 
    <td class="mdRow">
263
 
      <table cellpadding="0" cellspacing="0" border="0">
264
 
        <tr>
265
 
          <td class="md" nowrap valign="top">QCA::Cipher::Cipher           </td>
266
 
          <td class="md" valign="top">(&nbsp;</td>
267
 
          <td class="md" nowrap valign="top">const <a class="el" href="classQCA_1_1Cipher.html">Cipher</a> &amp;&nbsp;</td>
268
 
          <td class="mdname1" valign="top" nowrap> <em>from</em>          </td>
269
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
270
 
          <td class="md" nowrap></td>
271
 
        </tr>
272
 
      </table>
273
 
    </td>
274
 
  </tr>
275
 
</table>
276
 
<table cellspacing="5" cellpadding="0" border="0">
277
 
  <tr>
278
 
    <td>
279
 
      &nbsp;
280
 
    </td>
281
 
    <td>
282
 
 
283
 
<p>
284
 
Standard copy constructor. 
285
 
<p>
286
 
    </td>
287
 
  </tr>
288
 
</table>
289
 
<hr><h2>Member Function Documentation</h2>
290
 
<a class="anchor" name="3a3562c8db00240c37fdb59519ce37fa"></a><!-- doxytag: member="QCA::Cipher::operator=" ref="3a3562c8db00240c37fdb59519ce37fa" args="(const Cipher &amp;from)" --><p>
291
 
<table class="mdTable" cellpadding="2" cellspacing="0">
292
 
  <tr>
293
 
    <td class="mdRow">
294
 
      <table cellpadding="0" cellspacing="0" border="0">
295
 
        <tr>
296
 
          <td class="md" nowrap valign="top"><a class="el" href="classQCA_1_1Cipher.html">Cipher</a>&amp; QCA::Cipher::operator=           </td>
297
 
          <td class="md" valign="top">(&nbsp;</td>
298
 
          <td class="md" nowrap valign="top">const <a class="el" href="classQCA_1_1Cipher.html">Cipher</a> &amp;&nbsp;</td>
299
 
          <td class="mdname1" valign="top" nowrap> <em>from</em>          </td>
300
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
301
 
          <td class="md" nowrap></td>
302
 
        </tr>
303
 
      </table>
304
 
    </td>
305
 
  </tr>
306
 
</table>
307
 
<table cellspacing="5" cellpadding="0" border="0">
308
 
  <tr>
309
 
    <td>
310
 
      &nbsp;
311
 
    </td>
312
 
    <td>
313
 
 
314
 
<p>
315
 
Assignment operator. 
316
 
<p>
317
 
<dl compact><dt><b>Parameters:</b></dt><dd>
318
 
  <table border="0" cellspacing="2" cellpadding="0">
319
 
    <tr><td valign="top"></td><td valign="top"><em>from</em>&nbsp;</td><td>the <a class="el" href="classQCA_1_1Cipher.html">Cipher</a> to copy state from </td></tr>
320
 
  </table>
321
 
</dl>
322
 
    </td>
323
 
  </tr>
324
 
</table>
325
 
<a class="anchor" name="f5f60cff34b3d194878dc720c2772f56"></a><!-- doxytag: member="QCA::Cipher::type" ref="f5f60cff34b3d194878dc720c2772f56" args="() const " --><p>
326
 
<table class="mdTable" cellpadding="2" cellspacing="0">
327
 
  <tr>
328
 
    <td class="mdRow">
329
 
      <table cellpadding="0" cellspacing="0" border="0">
330
 
        <tr>
331
 
          <td class="md" nowrap valign="top"><a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> QCA::Cipher::type           </td>
332
 
          <td class="md" valign="top">(&nbsp;</td>
333
 
          <td class="mdname1" valign="top" nowrap>          </td>
334
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
335
 
          <td class="md" nowrap> const</td>
336
 
        </tr>
337
 
      </table>
338
 
    </td>
339
 
  </tr>
340
 
</table>
341
 
<table cellspacing="5" cellpadding="0" border="0">
342
 
  <tr>
343
 
    <td>
344
 
      &nbsp;
345
 
    </td>
346
 
    <td>
347
 
 
348
 
<p>
349
 
Return the cipher type. 
350
 
<p>
351
 
 
352
 
<p>
353
 
Reimplemented from <a class="el" href="classQCA_1_1Algorithm.html#503255bf0a33bad64c2d2aedc361e4c7">QCA::Algorithm</a>.    </td>
354
 
  </tr>
355
 
</table>
356
 
<a class="anchor" name="01c2511aed6f31a0f676f84d7a3f0cd7"></a><!-- doxytag: member="QCA::Cipher::mode" ref="01c2511aed6f31a0f676f84d7a3f0cd7" args="() const " --><p>
357
 
<table class="mdTable" cellpadding="2" cellspacing="0">
358
 
  <tr>
359
 
    <td class="mdRow">
360
 
      <table cellpadding="0" cellspacing="0" border="0">
361
 
        <tr>
362
 
          <td class="md" nowrap valign="top"><a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b">Mode</a> QCA::Cipher::mode           </td>
363
 
          <td class="md" valign="top">(&nbsp;</td>
364
 
          <td class="mdname1" valign="top" nowrap>          </td>
365
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
366
 
          <td class="md" nowrap> const</td>
367
 
        </tr>
368
 
      </table>
369
 
    </td>
370
 
  </tr>
371
 
</table>
372
 
<table cellspacing="5" cellpadding="0" border="0">
373
 
  <tr>
374
 
    <td>
375
 
      &nbsp;
376
 
    </td>
377
 
    <td>
378
 
 
379
 
<p>
380
 
Return the cipher mode. 
381
 
<p>
382
 
    </td>
383
 
  </tr>
384
 
</table>
385
 
<a class="anchor" name="a1a3f7287378c34d627540cab7a2bf01"></a><!-- doxytag: member="QCA::Cipher::padding" ref="a1a3f7287378c34d627540cab7a2bf01" args="() const " --><p>
386
 
<table class="mdTable" cellpadding="2" cellspacing="0">
387
 
  <tr>
388
 
    <td class="mdRow">
389
 
      <table cellpadding="0" cellspacing="0" border="0">
390
 
        <tr>
391
 
          <td class="md" nowrap valign="top"><a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b">Padding</a> QCA::Cipher::padding           </td>
392
 
          <td class="md" valign="top">(&nbsp;</td>
393
 
          <td class="mdname1" valign="top" nowrap>          </td>
394
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
395
 
          <td class="md" nowrap> const</td>
396
 
        </tr>
397
 
      </table>
398
 
    </td>
399
 
  </tr>
400
 
</table>
401
 
<table cellspacing="5" cellpadding="0" border="0">
402
 
  <tr>
403
 
    <td>
404
 
      &nbsp;
405
 
    </td>
406
 
    <td>
407
 
 
408
 
<p>
409
 
Return the cipher padding type. 
410
 
<p>
411
 
    </td>
412
 
  </tr>
413
 
</table>
414
 
<a class="anchor" name="cf1992168fae016c5f7531a4ee757de8"></a><!-- doxytag: member="QCA::Cipher::direction" ref="cf1992168fae016c5f7531a4ee757de8" args="() const " --><p>
415
 
<table class="mdTable" cellpadding="2" cellspacing="0">
416
 
  <tr>
417
 
    <td class="mdRow">
418
 
      <table cellpadding="0" cellspacing="0" border="0">
419
 
        <tr>
420
 
          <td class="md" nowrap valign="top"><a class="el" href="namespaceQCA.html#8e5d1994b00ea69c9a598f93cd0990ce">Direction</a> QCA::Cipher::direction           </td>
421
 
          <td class="md" valign="top">(&nbsp;</td>
422
 
          <td class="mdname1" valign="top" nowrap>          </td>
423
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
424
 
          <td class="md" nowrap> const</td>
425
 
        </tr>
426
 
      </table>
427
 
    </td>
428
 
  </tr>
429
 
</table>
430
 
<table cellspacing="5" cellpadding="0" border="0">
431
 
  <tr>
432
 
    <td>
433
 
      &nbsp;
434
 
    </td>
435
 
    <td>
436
 
 
437
 
<p>
438
 
Return the cipher direction. 
439
 
<p>
440
 
    </td>
441
 
  </tr>
442
 
</table>
443
 
<a class="anchor" name="2a4e19ab0ea7d8fc52e9c3d2f84aab02"></a><!-- doxytag: member="QCA::Cipher::keyLength" ref="2a4e19ab0ea7d8fc52e9c3d2f84aab02" args="() const " --><p>
444
 
<table class="mdTable" cellpadding="2" cellspacing="0">
445
 
  <tr>
446
 
    <td class="mdRow">
447
 
      <table cellpadding="0" cellspacing="0" border="0">
448
 
        <tr>
449
 
          <td class="md" nowrap valign="top"><a class="el" href="classQCA_1_1KeyLength.html">KeyLength</a> QCA::Cipher::keyLength           </td>
450
 
          <td class="md" valign="top">(&nbsp;</td>
451
 
          <td class="mdname1" valign="top" nowrap>          </td>
452
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
453
 
          <td class="md" nowrap> const</td>
454
 
        </tr>
455
 
      </table>
456
 
    </td>
457
 
  </tr>
458
 
</table>
459
 
<table cellspacing="5" cellpadding="0" border="0">
460
 
  <tr>
461
 
    <td>
462
 
      &nbsp;
463
 
    </td>
464
 
    <td>
465
 
 
466
 
<p>
467
 
Return acceptable key lengths. 
468
 
<p>
469
 
    </td>
470
 
  </tr>
471
 
</table>
472
 
<a class="anchor" name="1a0f3bb31878baceb8c9bd7718f2c3d6"></a><!-- doxytag: member="QCA::Cipher::validKeyLength" ref="1a0f3bb31878baceb8c9bd7718f2c3d6" args="(int n) const " --><p>
473
 
<table class="mdTable" cellpadding="2" cellspacing="0">
474
 
  <tr>
475
 
    <td class="mdRow">
476
 
      <table cellpadding="0" cellspacing="0" border="0">
477
 
        <tr>
478
 
          <td class="md" nowrap valign="top">bool QCA::Cipher::validKeyLength           </td>
479
 
          <td class="md" valign="top">(&nbsp;</td>
480
 
          <td class="md" nowrap valign="top">int&nbsp;</td>
481
 
          <td class="mdname1" valign="top" nowrap> <em>n</em>          </td>
482
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
483
 
          <td class="md" nowrap> const</td>
484
 
        </tr>
485
 
      </table>
486
 
    </td>
487
 
  </tr>
488
 
</table>
489
 
<table cellspacing="5" cellpadding="0" border="0">
490
 
  <tr>
491
 
    <td>
492
 
      &nbsp;
493
 
    </td>
494
 
    <td>
495
 
 
496
 
<p>
497
 
Test if a key length is valid for the cipher algorithm. 
498
 
<p>
499
 
<dl compact><dt><b>Parameters:</b></dt><dd>
500
 
  <table border="0" cellspacing="2" cellpadding="0">
501
 
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>the key length in bytes </td></tr>
502
 
  </table>
503
 
</dl>
504
 
<dl compact><dt><b>Returns:</b></dt><dd>true if the key would be valid for the current algorithm </dd></dl>
505
 
    </td>
506
 
  </tr>
507
 
</table>
508
 
<a class="anchor" name="c7d30a5ccf512e0625e307a10aebf6e1"></a><!-- doxytag: member="QCA::Cipher::blockSize" ref="c7d30a5ccf512e0625e307a10aebf6e1" args="() const " --><p>
509
 
<table class="mdTable" cellpadding="2" cellspacing="0">
510
 
  <tr>
511
 
    <td class="mdRow">
512
 
      <table cellpadding="0" cellspacing="0" border="0">
513
 
        <tr>
514
 
          <td class="md" nowrap valign="top">int QCA::Cipher::blockSize           </td>
515
 
          <td class="md" valign="top">(&nbsp;</td>
516
 
          <td class="mdname1" valign="top" nowrap>          </td>
517
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
518
 
          <td class="md" nowrap> const</td>
519
 
        </tr>
520
 
      </table>
521
 
    </td>
522
 
  </tr>
523
 
</table>
524
 
<table cellspacing="5" cellpadding="0" border="0">
525
 
  <tr>
526
 
    <td>
527
 
      &nbsp;
528
 
    </td>
529
 
    <td>
530
 
 
531
 
<p>
532
 
return the block size for the cipher object 
533
 
<p>
534
 
    </td>
535
 
  </tr>
536
 
</table>
537
 
<a class="anchor" name="6c51f4e2583e779e3793113c2b397a4f"></a><!-- doxytag: member="QCA::Cipher::clear" ref="6c51f4e2583e779e3793113c2b397a4f" args="()" --><p>
538
 
<table class="mdTable" cellpadding="2" cellspacing="0">
539
 
  <tr>
540
 
    <td class="mdRow">
541
 
      <table cellpadding="0" cellspacing="0" border="0">
542
 
        <tr>
543
 
          <td class="md" nowrap valign="top">virtual void QCA::Cipher::clear           </td>
544
 
          <td class="md" valign="top">(&nbsp;</td>
545
 
          <td class="mdname1" valign="top" nowrap>          </td>
546
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
547
 
          <td class="md" nowrap><code> [virtual]</code></td>
548
 
        </tr>
549
 
      </table>
550
 
    </td>
551
 
  </tr>
552
 
</table>
553
 
<table cellspacing="5" cellpadding="0" border="0">
554
 
  <tr>
555
 
    <td>
556
 
      &nbsp;
557
 
    </td>
558
 
    <td>
559
 
 
560
 
<p>
561
 
reset the cipher object, to allow re-use 
562
 
<p>
563
 
 
564
 
<p>
565
 
Implements <a class="el" href="classQCA_1_1Filter.html#cacc47ad8763d534efc2629ed192edb4">QCA::Filter</a>.    </td>
566
 
  </tr>
567
 
</table>
568
 
<a class="anchor" name="a730707a1fb3fef1f3d02b4afcfacab2"></a><!-- doxytag: member="QCA::Cipher::update" ref="a730707a1fb3fef1f3d02b4afcfacab2" args="(const MemoryRegion &amp;a)" --><p>
569
 
<table class="mdTable" cellpadding="2" cellspacing="0">
570
 
  <tr>
571
 
    <td class="mdRow">
572
 
      <table cellpadding="0" cellspacing="0" border="0">
573
 
        <tr>
574
 
          <td class="md" nowrap valign="top">virtual <a class="el" href="classQCA_1_1MemoryRegion.html">MemoryRegion</a> QCA::Cipher::update           </td>
575
 
          <td class="md" valign="top">(&nbsp;</td>
576
 
          <td class="md" nowrap valign="top">const <a class="el" href="classQCA_1_1MemoryRegion.html">MemoryRegion</a> &amp;&nbsp;</td>
577
 
          <td class="mdname1" valign="top" nowrap> <em>a</em>          </td>
578
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
579
 
          <td class="md" nowrap><code> [virtual]</code></td>
580
 
        </tr>
581
 
      </table>
582
 
    </td>
583
 
  </tr>
584
 
</table>
585
 
<table cellspacing="5" cellpadding="0" border="0">
586
 
  <tr>
587
 
    <td>
588
 
      &nbsp;
589
 
    </td>
590
 
    <td>
591
 
 
592
 
<p>
593
 
pass in a byte array of data, which will be encrypted or decrypted (according to the Direction that was set in the constructor or in <a class="el" href="classQCA_1_1Cipher.html#69b2257eeeacc4ff01166a45a662e8c7">setup()</a> ) and returned. 
594
 
<p>
595
 
<dl compact><dt><b>Parameters:</b></dt><dd>
596
 
  <table border="0" cellspacing="2" cellpadding="0">
597
 
    <tr><td valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>the array of data to encrypt / decrypt </td></tr>
598
 
  </table>
599
 
</dl>
600
 
 
601
 
<p>
602
 
Implements <a class="el" href="classQCA_1_1Filter.html#bb091f41a189df20ccdc53f25b022bab">QCA::Filter</a>.<dl compact><dt><b>Examples: </b></dt><dd>
603
 
<a class="el" href="ciphertest_8cpp-example.html#a58">ciphertest.cpp</a>.</dl>    </td>
604
 
  </tr>
605
 
</table>
606
 
<a class="anchor" name="bdab1417eb8dc7e8dd16d94ce031b490"></a><!-- doxytag: member="QCA::Cipher::final" ref="bdab1417eb8dc7e8dd16d94ce031b490" args="()" --><p>
607
 
<table class="mdTable" cellpadding="2" cellspacing="0">
608
 
  <tr>
609
 
    <td class="mdRow">
610
 
      <table cellpadding="0" cellspacing="0" border="0">
611
 
        <tr>
612
 
          <td class="md" nowrap valign="top">virtual <a class="el" href="classQCA_1_1MemoryRegion.html">MemoryRegion</a> QCA::Cipher::final           </td>
613
 
          <td class="md" valign="top">(&nbsp;</td>
614
 
          <td class="mdname1" valign="top" nowrap>          </td>
615
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
616
 
          <td class="md" nowrap><code> [virtual]</code></td>
617
 
        </tr>
618
 
      </table>
619
 
    </td>
620
 
  </tr>
621
 
</table>
622
 
<table cellspacing="5" cellpadding="0" border="0">
623
 
  <tr>
624
 
    <td>
625
 
      &nbsp;
626
 
    </td>
627
 
    <td>
628
 
 
629
 
<p>
630
 
complete the block of data, padding as required, and returning the completed block 
631
 
<p>
632
 
 
633
 
<p>
634
 
Implements <a class="el" href="classQCA_1_1Filter.html#27dc17e4f60d4ebbe9d7c3310db8efa4">QCA::Filter</a>.    </td>
635
 
  </tr>
636
 
</table>
637
 
<a class="anchor" name="12dae396f29a4241c13fb6f35489574f"></a><!-- doxytag: member="QCA::Cipher::ok" ref="12dae396f29a4241c13fb6f35489574f" args="() const " --><p>
638
 
<table class="mdTable" cellpadding="2" cellspacing="0">
639
 
  <tr>
640
 
    <td class="mdRow">
641
 
      <table cellpadding="0" cellspacing="0" border="0">
642
 
        <tr>
643
 
          <td class="md" nowrap valign="top">virtual bool QCA::Cipher::ok           </td>
644
 
          <td class="md" valign="top">(&nbsp;</td>
645
 
          <td class="mdname1" valign="top" nowrap>          </td>
646
 
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
647
 
          <td class="md" nowrap> const<code> [virtual]</code></td>
648
 
        </tr>
649
 
      </table>
650
 
    </td>
651
 
  </tr>
652
 
</table>
653
 
<table cellspacing="5" cellpadding="0" border="0">
654
 
  <tr>
655
 
    <td>
656
 
      &nbsp;
657
 
    </td>
658
 
    <td>
659
 
 
660
 
<p>
661
 
Test if an <a class="el" href="classQCA_1_1Cipher.html#a730707a1fb3fef1f3d02b4afcfacab2">update()</a> or <a class="el" href="classQCA_1_1Cipher.html#bdab1417eb8dc7e8dd16d94ce031b490">final()</a> call succeeded. 
662
 
<p>
663
 
<dl compact><dt><b>Returns:</b></dt><dd>true if the previous call succeeded </dd></dl>
664
 
 
665
 
<p>
666
 
Implements <a class="el" href="classQCA_1_1Filter.html#a0bd392d745b3086e2f82993bb55a896">QCA::Filter</a>.<dl compact><dt><b>Examples: </b></dt><dd>
667
 
<a class="el" href="ciphertest_8cpp-example.html#a59">ciphertest.cpp</a>.</dl>    </td>
668
 
  </tr>
669
 
</table>
670
 
<a class="anchor" name="69b2257eeeacc4ff01166a45a662e8c7"></a><!-- doxytag: member="QCA::Cipher::setup" ref="69b2257eeeacc4ff01166a45a662e8c7" args="(Direction dir, const SymmetricKey &amp;key, const InitializationVector &amp;iv=InitializationVector())" --><p>
671
 
<table class="mdTable" cellpadding="2" cellspacing="0">
672
 
  <tr>
673
 
    <td class="mdRow">
674
 
      <table cellpadding="0" cellspacing="0" border="0">
675
 
        <tr>
676
 
          <td class="md" nowrap valign="top">void QCA::Cipher::setup           </td>
677
 
          <td class="md" valign="top">(&nbsp;</td>
678
 
          <td class="md" nowrap valign="top"><a class="el" href="namespaceQCA.html#8e5d1994b00ea69c9a598f93cd0990ce">Direction</a>&nbsp;</td>
679
 
          <td class="mdname" nowrap> <em>dir</em>, </td>
680
 
        </tr>
681
 
        <tr>
682
 
          <td class="md" nowrap align="right"></td>
683
 
          <td class="md"></td>
684
 
          <td class="md" nowrap>const <a class="el" href="classQCA_1_1SymmetricKey.html">SymmetricKey</a> &amp;&nbsp;</td>
685
 
          <td class="mdname" nowrap> <em>key</em>, </td>
686
 
        </tr>
687
 
        <tr>
688
 
          <td class="md" nowrap align="right"></td>
689
 
          <td class="md"></td>
690
 
          <td class="md" nowrap>const <a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a> &amp;&nbsp;</td>
691
 
          <td class="mdname" nowrap> <em>iv</em> = <code><a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a>()</code></td>
692
 
        </tr>
693
 
        <tr>
694
 
          <td class="md"></td>
695
 
          <td class="md">)&nbsp;</td>
696
 
          <td class="md" colspan="2"></td>
697
 
        </tr>
698
 
      </table>
699
 
    </td>
700
 
  </tr>
701
 
</table>
702
 
<table cellspacing="5" cellpadding="0" border="0">
703
 
  <tr>
704
 
    <td>
705
 
      &nbsp;
706
 
    </td>
707
 
    <td>
708
 
 
709
 
<p>
710
 
Reset / reconfigure the <a class="el" href="classQCA_1_1Cipher.html">Cipher</a>. 
711
 
<p>
712
 
You can use this to re-use an existing <a class="el" href="classQCA_1_1Cipher.html">Cipher</a>, rather than creating a new object with a slightly different configuration.<p>
713
 
<dl compact><dt><b>Parameters:</b></dt><dd>
714
 
  <table border="0" cellspacing="2" cellpadding="0">
715
 
    <tr><td valign="top"></td><td valign="top"><em>dir</em>&nbsp;</td><td>the Direction that this <a class="el" href="classQCA_1_1Cipher.html">Cipher</a> should use (Encode for encryption, Decode for decryption) </td></tr>
716
 
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>the <a class="el" href="classQCA_1_1SymmetricKey.html">SymmetricKey</a> array that is the key </td></tr>
717
 
    <tr><td valign="top"></td><td valign="top"><em>iv</em>&nbsp;</td><td>the <a class="el" href="classQCA_1_1InitializationVector.html">InitializationVector</a> to use </td></tr>
718
 
  </table>
719
 
</dl>
720
 
    </td>
721
 
  </tr>
722
 
</table>
723
 
<a class="anchor" name="9be656582ff71957adbddf5ebabeb031"></a><!-- doxytag: member="QCA::Cipher::withAlgorithms" ref="9be656582ff71957adbddf5ebabeb031" args="(const QString &amp;cipherType, Mode modeType, Padding paddingType)" --><p>
724
 
<table class="mdTable" cellpadding="2" cellspacing="0">
725
 
  <tr>
726
 
    <td class="mdRow">
727
 
      <table cellpadding="0" cellspacing="0" border="0">
728
 
        <tr>
729
 
          <td class="md" nowrap valign="top">static <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> QCA::Cipher::withAlgorithms           </td>
730
 
          <td class="md" valign="top">(&nbsp;</td>
731
 
          <td class="md" nowrap valign="top">const <a class="elRef" doxygen="qt.tag:" href="qstring.html">QString</a> &amp;&nbsp;</td>
732
 
          <td class="mdname" nowrap> <em>cipherType</em>, </td>
733
 
        </tr>
734
 
        <tr>
735
 
          <td class="md" nowrap align="right"></td>
736
 
          <td class="md"></td>
737
 
          <td class="md" nowrap><a class="el" href="classQCA_1_1Cipher.html#55df34874dc7565d7de238d2d742d66b">Mode</a>&nbsp;</td>
738
 
          <td class="mdname" nowrap> <em>modeType</em>, </td>
739
 
        </tr>
740
 
        <tr>
741
 
          <td class="md" nowrap align="right"></td>
742
 
          <td class="md"></td>
743
 
          <td class="md" nowrap><a class="el" href="classQCA_1_1Cipher.html#eafc444370fbd6d1457580da2f00c52b">Padding</a>&nbsp;</td>
744
 
          <td class="mdname" nowrap> <em>paddingType</em></td>
745
 
        </tr>
746
 
        <tr>
747
 
          <td class="md"></td>
748
 
          <td class="md">)&nbsp;</td>
749
 
          <td class="md" colspan="2"><code> [static]</code></td>
750
 
        </tr>
751
 
      </table>
752
 
    </td>
753
 
  </tr>
754
 
</table>
755
 
<table cellspacing="5" cellpadding="0" border="0">
756
 
  <tr>
757
 
    <td>
758
 
      &nbsp;
759
 
    </td>
760
 
    <td>
761
 
 
762
 
<p>
763
 
Construct a <a class="el" href="classQCA_1_1Cipher.html">Cipher</a> type string. 
764
 
<p>
765
 
<dl compact><dt><b>Parameters:</b></dt><dd>
766
 
  <table border="0" cellspacing="2" cellpadding="0">
767
 
    <tr><td valign="top"></td><td valign="top"><em>cipherType</em>&nbsp;</td><td>the name of the algorithm (eg AES128, DES) </td></tr>
768
 
    <tr><td valign="top"></td><td valign="top"><em>modeType</em>&nbsp;</td><td>the mode to operate the cipher in (eg QCA::CBC, QCA::CFB) </td></tr>
769
 
    <tr><td valign="top"></td><td valign="top"><em>paddingType</em>&nbsp;</td><td>the padding required (eg QCA::NoPadding, QCA::PCKS7) </td></tr>
770
 
  </table>
771
 
</dl>
772
 
    </td>
773
 
  </tr>
774
 
</table>
775
 
<hr>The documentation for this class was generated from the following file:<ul>
776
 
<li><a class="el" href="qca__basic_8h-source.html">qca_basic.h</a></ul>
777
 
<hr size="1"><address style="align: right;"><small>Generated on Fri Jul 6 13:23:19 2007 for Qt Cryptographic Architecture by&nbsp;
778
 
<a href="http://www.doxygen.org/index.html">
779
 
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
780
 
</body>
781
 
</html>