Sun, 16 Feb 2025 15:06:29 +0100
Updated source code documentation.
<!DOCTYPE html> <html><head> <title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.hashlibInsecureFunctions</title> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a NAME="top" ID="top"></a> <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.hashlibInsecureFunctions</h1> <p> Module implementing a check for use of insecure md4, md5, or sha1 hash functions in hashlib. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr><td>None</td></tr> </table> <h3>Functions</h3> <table> <tr> <td><a href="#_cryptCrypt">_cryptCrypt</a></td> <td>Function to check for use of insecure md4, md5, sha or sha1 hash functions in crypt.crypt().</td> </tr> <tr> <td><a href="#_hashlibFunc">_hashlibFunc</a></td> <td>Function to check for use of insecure md4, md5, or sha1 hash functions in hashlib if 'usedforsecurity' is not set to 'False'.</td> </tr> <tr> <td><a href="#checkHashlib">checkHashlib</a></td> <td>Function to check for use of insecure md4, md5, sha or sha1 hash functions in hashlib.new().</td> </tr> <tr> <td><a href="#getChecks">getChecks</a></td> <td>Public method to get a dictionary with checks handled by this module.</td> </tr> </table> <hr /> <hr /> <a NAME="_cryptCrypt" ID="_cryptCrypt"></a> <h2>_cryptCrypt</h2> <b>_cryptCrypt</b>(<i>reportError, context, func, config</i>) <p> Function to check for use of insecure md4, md5, sha or sha1 hash functions in crypt.crypt(). </p> <dl> <dt><i>reportError</i> (func)</dt> <dd> function to be used to report errors </dd> <dt><i>context</i> (SecurityContext)</dt> <dd> security context object </dd> <dt><i>func</i> (str)</dt> <dd> name of the hash function </dd> <dt><i>config</i> (dict)</dt> <dd> dictionary with configuration data </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="_hashlibFunc" ID="_hashlibFunc"></a> <h2>_hashlibFunc</h2> <b>_hashlibFunc</b>(<i>reportError, context, func, config</i>) <p> Function to check for use of insecure md4, md5, or sha1 hash functions in hashlib if 'usedforsecurity' is not set to 'False'. </p> <dl> <dt><i>reportError</i> (func)</dt> <dd> function to be used to report errors </dd> <dt><i>context</i> (SecurityContext)</dt> <dd> security context object </dd> <dt><i>func</i> (str)</dt> <dd> name of the hash function </dd> <dt><i>config</i> (dict)</dt> <dd> dictionary with configuration data </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="checkHashlib" ID="checkHashlib"></a> <h2>checkHashlib</h2> <b>checkHashlib</b>(<i>reportError, context, config</i>) <p> Function to check for use of insecure md4, md5, sha or sha1 hash functions in hashlib.new(). </p> <dl> <dt><i>reportError</i> (func)</dt> <dd> function to be used to report errors </dd> <dt><i>context</i> (SecurityContext)</dt> <dd> security context object </dd> <dt><i>config</i> (dict)</dt> <dd> dictionary with configuration data </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="getChecks" ID="getChecks"></a> <h2>getChecks</h2> <b>getChecks</b>(<i></i>) <p> Public method to get a dictionary with checks handled by this module. </p> <dl> <dt>Return:</dt> <dd> dictionary containing checker lists containing checker function and list of codes </dd> </dl> <dl> <dt>Return Type:</dt> <dd> dict </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>