OpenSSL example

Here is a valid example from your command line using openSSL (just change the timestamp to the current time):

echo '{"security":{"nonce":"a1g6fhjj","timestamp":1227431978,"queryParams":{"test":"true"},"body":{"test":"true"}}}' | tr -d '\\n' | openssl dgst -sha256 -sign YOUR_PRIVATE_KEY_FILE | base64

PHP example

Here is a valid example using PHP (just change the timestamp to the current time):

$privateKey = openssl_pkey_get_private(base64_decode(YOUR_RIVATE_KEY));

openssl_sign(
    '{"security":{"nonce":"a1g6fhjj","timestamp":1227431978,"queryParams":{"test":"true"},"body":{"test":"true"}}}',
    $signature,
    $privateKey,
    OPENSSL_ALGO_SHA256
);

var_dump(base64_encode($signature));