Get available password hashing algorithm IDs

password_algos

(PHP 7 >= 7.4.0, PHP 8)

password_algosGet available password hashing algorithm IDs

說明

password_algos(): array

Returns a complete list of all registered password hashing algorithm IDs as an array of strings.

參數

此函式沒有參數。

返回值

Returns the available password hashing algorithm IDs.

範例

示例 #1 Basic password() usage

<?php
print_r
(password_algos());
?>

以上例程的輸出類似於:

Array
(
    [0] => 2y
    [1] => argon2i
    [2] => argon2id
)

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *