36673-vm/api/helpers.php
Flatlogic Bot c255bd35c4 1
2025-12-05 05:27:33 +00:00

16 lines
368 B
PHP

<?php
function get_api_credentials() {
$key_file = __DIR__ . '/../.keys/api_credentials.json';
if (!file_exists($key_file)) {
return null;
}
$creds_json = file_get_contents($key_file);
return json_decode($creds_json, true);
}
function sign_request($secret, $payload) {
return hash_hmac('sha256', json_encode($payload), $secret);
}
?>