public function createHMAC(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 key
        $sharedKey = new Key();
        $sharedKey->setSharedKey($this->sharedKey);

        // Create the signature.
        $base64_hmac          = $sharedKey->sign($data_to_sign);
        $request_data['hmac'] = $base64_hmac;

        return $base64_hmac;
    }