Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Portage Developer (http://www.linux-archive.org/gentoo-portage-developer/)
-   -   Manifest2 hash: SHA512 (http://www.linux-archive.org/gentoo-portage-developer/581876-manifest2-hash-sha512.html)

"Robin H. Johnson" 09-30-2011 01:27 AM

Manifest2 hash: SHA512
 
Provide SHA512 hash algorithm to be used as new Manifest2 hash.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
---
pym/portage/checksum.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
index 3d674c8..b2c9333 100644
--- a/pym/portage/checksum.py
+++ b/pym/portage/checksum.py
@@ -91,6 +91,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")
try:
hashlib.new('ripemd160')
except ValueError:
--
1.7.6

"Robin H. Johnson" 10-01-2011 07:40 AM

Manifest2 hash: SHA512
 
From: "Robin H. Johnson" <robbat2@gentoo.org>

Provide SHA512 hash algorithm to be used as new Manifest2 hash.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
---
pym/portage/checksum.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
index 3593686..40ae836 100644
--- a/pym/portage/checksum.py
+++ b/pym/portage/checksum.py
@@ -91,6 +91,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)
--
1.7.7


All times are GMT. The time now is 12:16 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.