Move base64 and sha/hex utility functions to crypto-utils.h