You are here

PasswordGeneratorInterface.php in Drupal 9

Same filename and directory in other branches
  1. 10 core/lib/Drupal/Core/Password/PasswordGeneratorInterface.php

File

core/lib/Drupal/Core/Password/PasswordGeneratorInterface.php
View source
<?php

namespace Drupal\Core\Password;


/**
 * Interface for generating passwords.
 */
interface PasswordGeneratorInterface {

  /**
   * Generates a password.
   *
   * @param int $length
   *   (optional) The length of the password.
   *
   * @return string
   *   The password.
   */
  public function generate(int $length = 10) : string;

}

Interfaces

Namesort descending Description
PasswordGeneratorInterface Interface for generating passwords.