PasswordGeneratorInterface.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Password/PasswordGeneratorInterface.php
  2. 10 core/lib/Drupal/Core/Password/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.

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