function PasswordGeneratorInterface::generate

Same name in other branches
  1. 10 core/lib/Drupal/Core/Password/PasswordGeneratorInterface.php \Drupal\Core\Password\PasswordGeneratorInterface::generate()
  2. 11.x core/lib/Drupal/Core/Password/PasswordGeneratorInterface.php \Drupal\Core\Password\PasswordGeneratorInterface::generate()

Generates a password.

Parameters

int $length: (optional) The length of the password.

Return value

string The password.

1 method overrides PasswordGeneratorInterface::generate()
DefaultPasswordGenerator::generate in core/lib/Drupal/Core/Password/DefaultPasswordGenerator.php
Generates a password.

File

core/lib/Drupal/Core/Password/PasswordGeneratorInterface.php, line 19

Class

PasswordGeneratorInterface
Interface for generating passwords.

Namespace

Drupal\Core\Password

Code

public function generate(int $length = 10) : string;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.