Manifest2 hash: SHA512
authorRobin H. Johnson <robbat2@gentoo.org>
Sat, 1 Oct 2011 07:40:53 +0000 (07:40 +0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 2 Oct 2011 05:37:06 +0000 (22:37 -0700)
Provide SHA512 hash algorithm to be used as new Manifest2 hash.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
pym/portage/checksum.py

index a4cf8de3c1e5beda4535d0457422b5aa0fff1377..6bace4d6ac739bfd50abe4e303ed7ae9ac0bf568 100644 (file)
@@ -96,6 +96,7 @@ try:
        md5hash = _generate_hash_function("MD5", hashlib.md5, origin="hashlib")
        sha1hash = _generate_hash_function("SHA1", hashlib.sha1, origin="hashlib")
        sha256hash = _generate_hash_function("SHA256", hashlib.sha256, origin="hashlib")
+       sha512hash = _generate_hash_function("SHA512", hashlib.sha512, origin="hashlib")
        for local_name, hash_name in (("rmd160", "ripemd160"), ("whirlpool", "whirlpool")):
                try:
                        hashlib.new(hash_name)