public function createSignature(array &$request_data)
    {
        // Make a nonce
        $request_data['cnonce'] = $this->createNonce();

        // Get the data to be signed.
        $data_to_sign = http_build_query($request_data);

        // Create the base64 encoded copy of the signature.
        $base64_signature = $this->key->sign($data_to_sign);
        if (! empty($base64_signature)) {
            $request_data['sig'] = $base64_signature;
        }

        return $base64_signature;
    }