Development

- It's now possible to adjust the load-order for parameters on routes.
- Replaced PHP 7.1 deprecated `mcrypt_create_iv` function with `random_bytes` if it is available (requires > PHP7)
- Added `setIndex`, `setName` and `setValue` methods to `IInputItem` to allow for extendability.
- Cleanup and bug fixes.
This commit is contained in:
Simon Sessingø
2016-11-25 18:26:50 +01:00
parent 1c515119b4
commit 68fc6b76c0
6 changed files with 175 additions and 149 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ class CsrfToken
*/
public static function generateToken()
{
if (function_exists('mcrypt_create_iv')) {
return bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM));
if (function_exists('random_bytes')) {
return bin2hex(random_bytes(32));
}
return bin2hex(openssl_random_pseudo_bytes(32));