Bludit uses predictable methods in combination with the MD5 hashing algorithm to generate sensitive tokens such as the API token and the user token. This allows attackers to authenticate against the Bludit API.
Generating secure API and user auth tokens in PHP involves creating unique and cryptographically secure strings that can be used as tokens for authentication purposes. The following code snippet is a basic example of how to generate secure API tokens in PHP:
```php
function generateApiToken($length = 32) {
$token = bin2hex(random_bytes($length));
return $token;
}
```
Configurations
Admin must enable the API (API is disabled by default).