lib: Update sha1 and base64 to use Bytes instead of String