Refactor base64 implementation
This codebase contains two slightly different base64 encoding wrappers,
both using low-level OpenSSL BIO API. The wrappers provide access to a
streaming interface, despite the fact that this property is not used
anywhere. To handle errors, the wrappers sometimes use exceptions and
sometimes return codes. To implement this, a stateful class was used,
and these four facts resulted in needlessly verbose code.
I have merged the two implementations and simplified them to two free
functions. The encode function now uses higher-level OpenSSL EVP API,
and the decode function was refactored.
Change-Id: I5016723158321d0c1aa10810aa9067cd2249f38e
19 files changed: