Bugfix on 1734d16 where we started using Java's DatatypeConverter class which defaults to upper-case, rather than Apache Commons Codec which returns lower-case strings.
Turns out that Java already comes with default implementations of SHA-1, SHA-256, and Base64 that we can use.
This bug was triggered by #16227, but only because that was the first newly introduced crypto block that we don't recognize yet.
Includes some really good suggestions from iwakeh. Implements #16151.