eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.weakCryptographicKey.html

branch
eric7
changeset 8372
e0227a7c850e
child 8596
d64760b2da50
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.weakCryptographicKey</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body>
22 <a NAME="top" ID="top"></a>
23 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.weakCryptographicKey</h1>
24
25 <p>
26 Module implementing checks for weak cryptographic key use.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36 <tr><td>None</td></tr>
37 </table>
38 <h3>Functions</h3>
39
40 <table>
41
42 <tr>
43 <td><a href="#_classifyKeySize">_classifyKeySize</a></td>
44 <td>Function to classify a key and report an error if insufficient.</td>
45 </tr>
46 <tr>
47 <td><a href="#_weakCryptoKeySizeCryptography">_weakCryptoKeySizeCryptography</a></td>
48 <td>Function to check 'cryptography.hazmat' for weak key use.</td>
49 </tr>
50 <tr>
51 <td><a href="#_weakCryptoKeySizePycrypto">_weakCryptoKeySizePycrypto</a></td>
52 <td>Function to check 'pycrypto' for weak key use.</td>
53 </tr>
54 <tr>
55 <td><a href="#checkWeakCryptographicKey">checkWeakCryptographicKey</a></td>
56 <td>Function to check for weak cryptographic key use.</td>
57 </tr>
58 <tr>
59 <td><a href="#getChecks">getChecks</a></td>
60 <td>Public method to get a dictionary with checks handled by this module.</td>
61 </tr>
62 </table>
63 <hr />
64 <hr />
65 <a NAME="_classifyKeySize" ID="_classifyKeySize"></a>
66 <h2>_classifyKeySize</h2>
67 <b>_classifyKeySize</b>(<i>reportError, config, keyType, keySize, node</i>)
68
69 <p>
70 Function to classify a key and report an error if insufficient.
71 </p>
72 <dl>
73
74 <dt><i>reportError</i> (func)</dt>
75 <dd>
76 function to be used to report errors
77 </dd>
78 <dt><i>config</i> (dict)</dt>
79 <dd>
80 dictionary with configuration data
81 </dd>
82 <dt><i>keyType</i> (str)</dt>
83 <dd>
84 type of key to be classified ('DSA', 'RSA', 'EC')
85 </dd>
86 <dt><i>keySize</i> (int)</dt>
87 <dd>
88 size of the key to be classified
89 </dd>
90 <dt><i>node</i> (ast.Call)</dt>
91 <dd>
92 node the key was extracted from (needed for reporting)
93 </dd>
94 </dl>
95 <dl>
96 <dt>Return:</dt>
97 <dd>
98 flag indicating an error was reported
99 </dd>
100 </dl>
101 <dl>
102 <dt>Return Type:</dt>
103 <dd>
104 bool
105 </dd>
106 </dl>
107 <div align="right"><a href="#top">Up</a></div>
108 <hr />
109 <hr />
110 <a NAME="_weakCryptoKeySizeCryptography" ID="_weakCryptoKeySizeCryptography"></a>
111 <h2>_weakCryptoKeySizeCryptography</h2>
112 <b>_weakCryptoKeySizeCryptography</b>(<i>reportError, context, config</i>)
113
114 <p>
115 Function to check 'cryptography.hazmat' for weak key use.
116 </p>
117 <dl>
118
119 <dt><i>reportError</i> (func)</dt>
120 <dd>
121 function to be used to report errors
122 </dd>
123 <dt><i>context</i> (SecurityContext)</dt>
124 <dd>
125 security context object
126 </dd>
127 <dt><i>config</i> (dict)</dt>
128 <dd>
129 dictionary with configuration data
130 </dd>
131 </dl>
132 <dl>
133 <dt>Return:</dt>
134 <dd>
135 flag indicating an error was reported
136 </dd>
137 </dl>
138 <dl>
139 <dt>Return Type:</dt>
140 <dd>
141 bool
142 </dd>
143 </dl>
144 <div align="right"><a href="#top">Up</a></div>
145 <hr />
146 <hr />
147 <a NAME="_weakCryptoKeySizePycrypto" ID="_weakCryptoKeySizePycrypto"></a>
148 <h2>_weakCryptoKeySizePycrypto</h2>
149 <b>_weakCryptoKeySizePycrypto</b>(<i>reportError, context, config</i>)
150
151 <p>
152 Function to check 'pycrypto' for weak key use.
153 </p>
154 <dl>
155
156 <dt><i>reportError</i> (func)</dt>
157 <dd>
158 function to be used to report errors
159 </dd>
160 <dt><i>context</i> (SecurityContext)</dt>
161 <dd>
162 security context object
163 </dd>
164 <dt><i>config</i> (dict)</dt>
165 <dd>
166 dictionary with configuration data
167 </dd>
168 </dl>
169 <dl>
170 <dt>Return:</dt>
171 <dd>
172 flag indicating an error was reported
173 </dd>
174 </dl>
175 <dl>
176 <dt>Return Type:</dt>
177 <dd>
178 bool
179 </dd>
180 </dl>
181 <div align="right"><a href="#top">Up</a></div>
182 <hr />
183 <hr />
184 <a NAME="checkWeakCryptographicKey" ID="checkWeakCryptographicKey"></a>
185 <h2>checkWeakCryptographicKey</h2>
186 <b>checkWeakCryptographicKey</b>(<i>reportError, context, config</i>)
187
188 <p>
189 Function to check for weak cryptographic key use.
190 </p>
191 <dl>
192
193 <dt><i>reportError</i> (func)</dt>
194 <dd>
195 function to be used to report errors
196 </dd>
197 <dt><i>context</i> (SecurityContext)</dt>
198 <dd>
199 security context object
200 </dd>
201 <dt><i>config</i> (dict)</dt>
202 <dd>
203 dictionary with configuration data
204 </dd>
205 </dl>
206 <div align="right"><a href="#top">Up</a></div>
207 <hr />
208 <hr />
209 <a NAME="getChecks" ID="getChecks"></a>
210 <h2>getChecks</h2>
211 <b>getChecks</b>(<i></i>)
212
213 <p>
214 Public method to get a dictionary with checks handled by this module.
215 </p>
216 <dl>
217 <dt>Return:</dt>
218 <dd>
219 dictionary containing checker lists containing checker function and
220 list of codes
221 </dd>
222 </dl>
223 <dl>
224 <dt>Return Type:</dt>
225 <dd>
226 dict
227 </dd>
228 </dl>
229 <div align="right"><a href="#top">Up</a></div>
230 <hr />
231 </body></html>

eric ide

mercurial