Tests run (for SHA256, add SHA512 as needed):
(1) time for i in md5 sha1 sha256; do nettle-hash -a $i < /tmp/test ; done
(2) time for i in md5 sha1 sha256; do openssl $i < /tmp/test ; done
(3) ./a.out < /tmp/test
where a.out is
#include <apt-pkg/hashes.h>
#include <iostream>
int main(void)
{
Hashes h(Hashes::MD5SUM | Hashes::SHA1SUM | Hashes::SHA256SUM);
h.AddFD(0);
auto hsl = h.GetHashStringList();
for (HashString const &h : hsl)
std::cout << h.toStr() << std::endl;
return 0;
}
compiled with g++ -lapt-pkg -O2
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1123272
Title:
high cpu usage on download (not optimised SHA256, SHA512, SHA1)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1123272/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs