mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 02:15:10 +00:00 
			
		
		
		
	 f21a5f7739
			
		
	
	
		f21a5f7739
		
	
	
	
	
		
			
			A new hashlib module to replace the md5 and sha modules. It adds support for additional secure hashes such as SHA-256 and SHA-512. The hashlib module uses OpenSSL for fast platform optimized implementations of algorithms when available. The old md5 and sha modules still exist as wrappers around hashlib to preserve backwards compatibility.
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			265 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			265 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # $Id$
 | |
| #
 | |
| #  Copyright (C) 2005   Gregory P. Smith (greg@electricrain.com)
 | |
| #  Licensed to PSF under a Contributor Agreement.
 | |
| 
 | |
| from hashlib import sha1 as sha
 | |
| new = sha
 | |
| 
 | |
| blocksize = 1        # legacy value (wrong in any useful sense)
 | |
| digest_size = 20
 | |
| digestsize = 20
 |