hash_algos() – Returns List of Registered Hash Algorithms in PHP

The PHP function hash_algos() returns an indexed array of all supported hash algorithm names, allowing developers to retrieve the available algorithms for cryptographic operations; the documentation includes its signature, return description, a usage example, and a sample output listing algorithms such as md5, sha1, and crc32.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
hash_algos() – Returns List of Registered Hash Algorithms in PHP

The hash_algos() function in PHP returns an indexed array containing the names of all supported hash algorithms.

Return value: An array of strings, each representing a hash algorithm such as md5, sha1, crc32, etc.

Example usage:

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

Sample output:

Array
(
    [0] => md2
    [1] => md4
    [2] => md5
    [3] => sha1
    [4] => sha224
    [5] => sha256
    [6] => sha384
    [7] => sha512
    [8] => ripemd128
    [9] => ripemd160
    ...
)
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

securityHash
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.