Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

PasswordGeneratorInterface.php

Namespace

Drupal\Core\Password

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

Title Deprecated Summary
PasswordGeneratorInterface Interface for generating passwords.
RSS feed
Powered by Drupal