mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	* Issue #16113: Remove sha3 module again.
Patch by Christian Heimes, with modifications.
This commit is contained in:
		
							parent
							
								
									f3b46b4a66
								
							
						
					
					
						commit
						24e43308b7
					
				
					 38 changed files with 5 additions and 8844 deletions
				
			
		|  | @ -54,8 +54,7 @@ | |||
| 
 | ||||
| # This tuple and __get_builtin_constructor() must be modified if a new | ||||
| # always available algorithm is added. | ||||
| __always_supported = ('md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', | ||||
|                       'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512') | ||||
| __always_supported = ('md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512') | ||||
| 
 | ||||
| algorithms_guaranteed = set(__always_supported) | ||||
| algorithms_available = set(__always_supported) | ||||
|  | @ -86,13 +85,6 @@ def __get_builtin_constructor(name): | |||
|             import _sha512 | ||||
|             cache['SHA384'] = cache['sha384'] = _sha512.sha384 | ||||
|             cache['SHA512'] = cache['sha512'] = _sha512.sha512 | ||||
|         elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512', | ||||
|                       'SHA3_224', 'SHA3_256', 'SHA3_384', 'SHA3_512'}: | ||||
|             import _sha3 | ||||
|             cache['SHA3_224'] = cache['sha3_224'] = _sha3.sha3_224 | ||||
|             cache['SHA3_256'] = cache['sha3_256'] = _sha3.sha3_256 | ||||
|             cache['SHA3_384'] = cache['sha3_384'] = _sha3.sha3_384 | ||||
|             cache['SHA3_512'] = cache['sha3_512'] = _sha3.sha3_512 | ||||
|     except ImportError: | ||||
|         pass  # no extension module, this hash is unsupported. | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Martin v. Löwis
						Martin v. Löwis