API key generated using md5 works great outside of wordpress. When using the exact same code within wordpress, the key causes a 'not authorized' error.
I'm interacting with an API that requires generating a key as shown below. For testing, I've used postman as well as a php sandbox: http://sandbox.onlinephpfunctions.com/
$key = '12345';
$timestamp = gmdate('U');
$signature = md5( $key . '6789' . $timestamp );
$url = "https://my-api.com/v1&signature={$signature}&key={$key}";
echo $url;
From the PHP sandbox, if I echo $url and drop it into my browser, I get a successful return with an object. If I echo the same $url from my wordpress build and paste that into a browser, I get this message: {"status":"fail","data":"not authorized"}
I've compared each character in the urls generated from both sources. The only diff is the $signature. The signature generated outside of wordpress works great while the one from wordpress doesn't work. Each URL is a 32 character string, as expected.
I've researched if Wordpress generates md5 hashes differently but haven't found much information. Hoping for some clarity.