Basically how I am looking at this is as follows. On the web you have two ways to send parameters to another site: GET and POST. Either way the parameters will be strings, not arrays or any datatype. That's just how HTTP works.
Ok. So I'm writing an api. I want the parameters coming in sha1 e̶n̶c̶r̶y̶p̶t̶e̶d̶ hashed. How shall I do this? I can tell my customers to send it like:
$requestUrl = "example.com/api?key1=" . sha1($value1) . "&key2=" . sha1($value2);
OR
$params = array("key1" => "value1", "key2" => "value2");
$requestUrl = "example.com/api?params=" . base64_encode(sha1(implode(',', $params)));
If there is a long list of params, the second one makes more sense.
Also, if you don't want meddlers to try and decrypt each param separately which would be much easier to figure out I think than decrypting them all together, you might opt for this approach.
Base64 encoding gets around having to worry about characters like &
which can break a querystring on a GET request.
Basically, its dictated by the API creator. Its not the choice of the developer who is using the API.
EDIT: My initial thought made more sense when I forgot that sha1() is only a hashing algorithm and not reversible encryption. There might be a way they could still make this work, but its convoluted and a very bad idea.