Build the signature | PHP



// device password

       $password = '0000';

       

       // UTC timestamp

       date_default_timezone_set("UTC");

       $timestamp = time();


       // signature

       $sig = hash_hmac('sha256', $timestamp, $password, true);

       $sig = base64_encode($sig);