|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.insecureHashlibNew</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.insecureHashlibNew</h1> |
|
10 <p> |
|
11 Module implementing a check for use of insecure md4, md5, or sha1 hash |
|
12 functions in hashlib.new(). |
|
13 </p> |
|
14 |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 |
|
20 <h3>Classes</h3> |
|
21 <table> |
|
22 <tr><td>None</td></tr> |
|
23 </table> |
|
24 |
|
25 <h3>Functions</h3> |
|
26 <table> |
|
27 <tr> |
|
28 <td><a href="#_cryptCrypt">_cryptCrypt</a></td> |
|
29 <td>Function to check for use of insecure md4, md5, sha or sha1 hash functions in crypt.crypt().</td> |
|
30 </tr> |
|
31 <tr> |
|
32 <td><a href="#_hashlibFunc">_hashlibFunc</a></td> |
|
33 <td>Function to check for use of insecure md4, md5, sha or sha1 hash functions in hashlib.new() if 'usedforsecurity' is not set to 'False'.</td> |
|
34 </tr> |
|
35 <tr> |
|
36 <td><a href="#_hashlibNew">_hashlibNew</a></td> |
|
37 <td>Function to check for use of insecure md4, md5, sha or sha1 hash functions in hashlib.new().</td> |
|
38 </tr> |
|
39 <tr> |
|
40 <td><a href="#checkHashlib">checkHashlib</a></td> |
|
41 <td>Function to check for use of insecure md4, md5, sha or sha1 hash functions in hashlib.new().</td> |
|
42 </tr> |
|
43 <tr> |
|
44 <td><a href="#getChecks">getChecks</a></td> |
|
45 <td>Public method to get a dictionary with checks handled by this module.</td> |
|
46 </tr> |
|
47 </table> |
|
48 |
|
49 <hr /> |
|
50 <hr /> |
|
51 <a NAME="_cryptCrypt" ID="_cryptCrypt"></a> |
|
52 <h2>_cryptCrypt</h2> |
|
53 <b>_cryptCrypt</b>(<i>reportError, context, func, config</i>) |
|
54 <p> |
|
55 Function to check for use of insecure md4, md5, sha or sha1 hash functions |
|
56 in crypt.crypt(). |
|
57 </p> |
|
58 |
|
59 <dl> |
|
60 |
|
61 <dt><i>reportError</i> (func)</dt> |
|
62 <dd> |
|
63 function to be used to report errors |
|
64 </dd> |
|
65 <dt><i>context</i> (SecurityContext)</dt> |
|
66 <dd> |
|
67 security context object |
|
68 </dd> |
|
69 <dt><i>func</i> (str)</dt> |
|
70 <dd> |
|
71 name of the hash function |
|
72 </dd> |
|
73 <dt><i>config</i> (dict)</dt> |
|
74 <dd> |
|
75 dictionary with configuration data |
|
76 </dd> |
|
77 </dl> |
|
78 <div align="right"><a href="#top">Up</a></div> |
|
79 <hr /> |
|
80 <hr /> |
|
81 <a NAME="_hashlibFunc" ID="_hashlibFunc"></a> |
|
82 <h2>_hashlibFunc</h2> |
|
83 <b>_hashlibFunc</b>(<i>reportError, context, func, config</i>) |
|
84 <p> |
|
85 Function to check for use of insecure md4, md5, sha or sha1 hash functions |
|
86 in hashlib.new() if 'usedforsecurity' is not set to 'False'. |
|
87 </p> |
|
88 |
|
89 <dl> |
|
90 |
|
91 <dt><i>reportError</i> (func)</dt> |
|
92 <dd> |
|
93 function to be used to report errors |
|
94 </dd> |
|
95 <dt><i>context</i> (SecurityContext)</dt> |
|
96 <dd> |
|
97 security context object |
|
98 </dd> |
|
99 <dt><i>func</i> (str)</dt> |
|
100 <dd> |
|
101 name of the hash function |
|
102 </dd> |
|
103 <dt><i>config</i> (dict)</dt> |
|
104 <dd> |
|
105 dictionary with configuration data |
|
106 </dd> |
|
107 </dl> |
|
108 <div align="right"><a href="#top">Up</a></div> |
|
109 <hr /> |
|
110 <hr /> |
|
111 <a NAME="_hashlibNew" ID="_hashlibNew"></a> |
|
112 <h2>_hashlibNew</h2> |
|
113 <b>_hashlibNew</b>(<i>reportError, context, func, config</i>) |
|
114 <p> |
|
115 Function to check for use of insecure md4, md5, sha or sha1 hash functions |
|
116 in hashlib.new(). |
|
117 </p> |
|
118 |
|
119 <dl> |
|
120 |
|
121 <dt><i>reportError</i> (func)</dt> |
|
122 <dd> |
|
123 function to be used to report errors |
|
124 </dd> |
|
125 <dt><i>context</i> (SecurityContext)</dt> |
|
126 <dd> |
|
127 security context object |
|
128 </dd> |
|
129 <dt><i>func</i> (str)</dt> |
|
130 <dd> |
|
131 name of the hash function |
|
132 </dd> |
|
133 <dt><i>config</i> (dict)</dt> |
|
134 <dd> |
|
135 dictionary with configuration data |
|
136 </dd> |
|
137 </dl> |
|
138 <div align="right"><a href="#top">Up</a></div> |
|
139 <hr /> |
|
140 <hr /> |
|
141 <a NAME="checkHashlib" ID="checkHashlib"></a> |
|
142 <h2>checkHashlib</h2> |
|
143 <b>checkHashlib</b>(<i>reportError, context, config</i>) |
|
144 <p> |
|
145 Function to check for use of insecure md4, md5, sha or sha1 hash functions |
|
146 in hashlib.new(). |
|
147 </p> |
|
148 |
|
149 <dl> |
|
150 |
|
151 <dt><i>reportError</i> (func)</dt> |
|
152 <dd> |
|
153 function to be used to report errors |
|
154 </dd> |
|
155 <dt><i>context</i> (SecurityContext)</dt> |
|
156 <dd> |
|
157 security context object |
|
158 </dd> |
|
159 <dt><i>config</i> (dict)</dt> |
|
160 <dd> |
|
161 dictionary with configuration data |
|
162 </dd> |
|
163 </dl> |
|
164 <div align="right"><a href="#top">Up</a></div> |
|
165 <hr /> |
|
166 <hr /> |
|
167 <a NAME="getChecks" ID="getChecks"></a> |
|
168 <h2>getChecks</h2> |
|
169 <b>getChecks</b>(<i></i>) |
|
170 <p> |
|
171 Public method to get a dictionary with checks handled by this module. |
|
172 </p> |
|
173 |
|
174 <dl> |
|
175 <dt>Return:</dt> |
|
176 <dd> |
|
177 dictionary containing checker lists containing checker function and |
|
178 list of codes |
|
179 </dd> |
|
180 </dl> |
|
181 <dl> |
|
182 <dt>Return Type:</dt> |
|
183 <dd> |
|
184 dict |
|
185 </dd> |
|
186 </dl> |
|
187 <div align="right"><a href="#top">Up</a></div> |
|
188 <hr /> |
|
189 </body></html> |