hashlib has two new constant attributes: algorithms_guaranteed and
algorithms_avaiable that respectively list the names of hash algorithms
guaranteed to exist in all Python implementations and the names of hash
algorithms available in the current process.

Renames the attribute new in 3.2a0 'algorithms' to 'algorithms_guaranteed'.
diff --git a/Lib/hashlib.py b/Lib/hashlib.py
index aacb268..9d860c4 100644
--- a/Lib/hashlib.py
+++ b/Lib/hashlib.py
@@ -1,6 +1,4 @@
-# $Id$
-#
-#  Copyright (C) 2005-2007   Gregory P. Smith (greg@krypto.org)
+#  Copyright (C) 2005-2010   Gregory P. Smith (greg@krypto.org)
 #  Licensed to PSF under a Contributor Agreement.
 #
 
@@ -15,8 +13,9 @@
 
 md5(), sha1(), sha224(), sha256(), sha384(), and sha512()
 
-More algorithms may be available on your platform but the above are
-guaranteed to exist.
+More algorithms may be available on your platform but the above are guaranteed
+to exist.  See the algorithms_guaranteed and algorithms_available attributes
+to find out what algorithm names can be passed to new().
 
 NOTE: If you want the adler32 or crc32 hash functions they are available in
 the zlib module.
@@ -57,9 +56,11 @@
 # always available algorithm is added.
 __always_supported = ('md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512')
 
-algorithms = __always_supported
+algorithms_guaranteed = __always_supported
+algorithms_available = frozenset(__always_supported)
 
-__all__ = __always_supported + ('new', 'algorithms')
+__all__ = __always_supported + ('new', 'algorithms_guaranteed',
+                                'algorithms_available')
 
 
 def __get_builtin_constructor(name):
@@ -124,6 +125,8 @@
     import _hashlib
     new = __hash_new
     __get_hash = __get_openssl_constructor
+    algorithms_available = algorithms_available.union(
+            _hashlib.openssl_md_meth_names)
 except ImportError:
     new = __py_new
     __get_hash = __get_builtin_constructor