Chuyển đến nội dung
Tài liệu

Tra cứu lớp và hàm

Password

Danh sách các phương thức công khai của lớp Zittme\Framework\Password. Tài liệu này được tạo tự động từ mã nguồn lõi Zittme.

Nguồn: common/framework/Password.php

Phương thức công khai

  • static function addAlgorithm(string $name, string $signature, callable $callback)
  • Add a custom algorithm.
  • static function isValidAlgorithm($algos)
  • Check if the given sequence of algorithms is valid.
  • static function getSupportedAlgorithms()
  • Get the list of hashing algorithms supported by this server.
  • static function getBestSupportedAlgorithm()
  • Get the best hashing algorithm supported by this server.
  • static function getDefaultAlgorithm()
  • Get the current default hashing algorithm.
  • static function getBackwardCompatibleAlgorithm()
  • Get the current default hashing algorithm, unless it will produce
  • static function getWorkFactor()
  • Get the currently configured work factor for bcrypt and other adjustable algorithms.
  • static function getRandomPassword(int $length = 16)
  • Generate a reasonably strong random password.
  • static function hashPassword(string $password, $algos = null, ?string $salt = null)
  • Hash a password.
  • static function checkPassword(string $password, string $hash, $algos = null)
  • Check a password against a hash.
  • static function checkAlgorithm(string $hash)
  • Guess which algorithm(s) were used to generate the given hash.
  • static function checkWorkFactor(string $hash)
  • Check the work factor of a hash.
  • static function argon2id(string $password, int $work_factor = 10)
  • Generate the argon2id hash of a string.
  • static function bcrypt(string $password, ?string $salt = null, int $work_factor = 10)
  • Generate the bcrypt hash of a string.
  • static function pbkdf2(string $password, ?string $salt = null, string $algorithm = 'sha512', int $iterations = 16384, int $length = 24, int $iterations_padding = 7)
  • Generate the PBKDF2 hash of a string.
  • static function countEntropyBits(string $password)
  • Count the amount of entropy that a password contains.