Summary: | Portage should use hashlib if available | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Aidan Thornton <makosoft> |
Component: | Enhancement/Feature Requests | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | nelchael |
Priority: | High | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 181949 | ||
Attachments: |
Proposed patch to portage_checksum.py
New patch to portage_checksum.py |
Description
Aidan Thornton
2006-09-21 07:40:12 UTC
Created attachment 97653 [details, diff]
Proposed patch to portage_checksum.py
A patch to portage_checksum.py to use hashlib if it's available and pycrypto isn't.
It might be worth it to prefer hashlib over pycrypto. Some limited benchmarking indicates hashlib (using openssl) is faster than pycrypto is, and it is probably at least as reliable too (I only skimmed the patch, so if it already does that then please ignore me). Created attachment 97838 [details, diff]
New patch to portage_checksum.py
Previous patch had a bug which caused it to fail if using pycrypto.
(The patch still only uses hashlib as a fallback if pycrypto is unavailable - it should be fairly easy to modify it to use hashlib over pycrypto though, should it be worth doing so.)
This has been released in 2.1.3_rc6. |