libbrillo: Blob to/from std::string conversions

Add routines that allow dumping Blob contents into an
std::string, and, vice versa, constructing Blob from
such a string.

These helpers should simplify writing code that works
with Blob's, and consequently help transitioning away from
SecureBlob (as the latter provides the same capabilities).

BUG=chromium:728047
TEST=new unit test (BlobTest.StringConversions)

Change-Id: I18223a99899216fe07cbf948bef86dce86777f69
Reviewed-on: https://chromium-review.googlesource.com/1076629
Commit-Ready: Maksim Ivanov <emaxx@chromium.org>
Tested-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
3 files changed