We used to depend on the 'blake2s256' and 'blake2b512' names to be available in
hashlib.algorithms_available. It turns out that that's specific to OpenSSL 1.1.
We now try, in order:
- blake2s256/blake2b512 as shipped by libssl1.1 (Python 3.5+ on Debian stretch and up)
- blake2s/blake2b as built into Python 3.6+
- pyblake2 if all else fails
While we're here, let's also avoid doing not-so-subtle hacks with hashlib
builtins.
Thanks to Alexios Zavras for the report.