/** * Testing the results of the custom hash_equals function */ public function testHashEquals() { $hash1 = md5(mt_rand()); $header = new Header('test'); $jwt = new Jwt($header); $this->assertTrue($jwt->hash_equals($hash1, $hash1)); $this->assertFalse($jwt->hash_equals($hash1, 'badhash')); }