CsrfTokenGenerator

class OC\Security\CSRF\CsrfTokenGenerator
Class CsrfTokenGenerator is used to generate a cryptographically secure
pseudo-random number for the token.
Source:lib/private/Security/CSRF/CsrfTokenGenerator.php#37

Properties

Methods

public OC\Security\CSRF\CsrfTokenGenerator::__construct($random)
Source:

lib/private/Security/CSRF/CsrfTokenGenerator.php#44

Parameters:
public OC\Security\CSRF\CsrfTokenGenerator::generateToken($length=32)
Generate a new CSRF token.
Source:

lib/private/Security/CSRF/CsrfTokenGenerator.php#54

Parameters:
  • $length (int) Length of the token in characters.
Returns:

string