fork download
  1. <?php
  2.  
  3. foreach (hash_algos() as $hash_algos) {
  4. $hash = hash($hash_algos, "salt", false);
  5. $results[] = ['algo' => $hash_algos, 'len' => strlen($hash), 'hash' => $hash];
  6. }
  7.  
  8. function compara($a, $b) {
  9. return $a['len'] - $b['len'];
  10. }
  11. usort($results, 'compara');
  12.  
  13. foreach ($results as $result) {
  14. echo $result['algo'].' '.$result['len'].' '.$result['hash'].PHP_EOL;
  15. }
  16.  
Success #stdin #stdout 0.03s 82880KB
stdin
Standard input is empty
stdout
joaat 8 0fd2aa50
fnv1a32 8 c20e7781
fnv132 8 31e99a1d
crc32b 8 8ffbe0f7
crc32 8 e025bd85
adler32 8 043f01b5
fnv1a64 16 097f5318bf97c581
fnv164 16 92f86f7ea33c8b5d
haval128,4 32 39a95dc8aa4d976c558e2c172c85f683
md4 32 32562a64329a66319acd0266190eba5f
tiger128,4 32 9fe095b85f06f8e1879db32471489004
tiger128,3 32 87a7e3aa24be06bb84bc4a44d4f5b76e
haval128,3 32 0199be077723b691a99cc37ef5aaf7a5
md2 32 4d665e8dbe585764403bdc28bf9848ca
ripemd128 32 f22bef18fa1d9b57deaebdf33ab136f1
md5 32 ceb20772e0c9d240c75eb26b0e37abee
haval128,5 32 6de214e309c2a350e7cbbd514412683a
haval160,5 40 3386e40ed7c12d658eaff50bf2ed7708bdb8cd46
haval160,4 40 3992fb8e3595d917c109672ea2cf704a8e28a241
sha1 40 b295d117135a9763da282e7dae73a5ca7d3e5b11
tiger160,3 40 87a7e3aa24be06bb84bc4a44d4f5b76e3352e6cd
tiger160,4 40 9fe095b85f06f8e1879db32471489004c48fb1e2
ripemd160 40 4d32476727ba2bb65913789ffca8f5cf7e4b0b90
haval160,3 40 b8c7d81c1673c45a515706c9e19893f7b80377a3
haval192,4 48 103758849af6f501d11d9a6090294ac2f63f3401377b7ee2
tiger192,3 48 87a7e3aa24be06bb84bc4a44d4f5b76e3352e6cd622b7838
haval192,5 48 4f46f76be5e683bdd62410e39b48a6240023a18b62e05fd0
tiger192,4 48 9fe095b85f06f8e1879db32471489004c48fb1e23e4b0749
haval192,3 48 98430ad6145d51ce659d3c7e5a0e5ee930c4bed60ac14dfe
sha224 56 80afaaa043f22b53837427563cf87184a7344567c6875d8883f958b3
haval224,5 56 6c94037a40928a9fabd9f18acecb72d1668d1b49204293b883208882
haval224,3 56 1388d61649770fa55b6dfb2440918260910100c2272a522be4f82974
sha512/224 56 73444ca548a4dd9bdaaa07f2de019dc93ece0a5b0b0f202660cbcdd1
sha3-224 56 f254fe6fe9ca1c8c333f88a0735d4bb612993d7a97ccd9ef7025a0af
haval224,4 56 f92ac145b18386563280b430ab93e2dbfd9f834513ba43715ba76855
haval256,4 64 88e378cf619471e1ebc932a5e0d9ad91987dff15eaff2b54e5632da989cb4c6f
haval256,3 64 ca7d86570abd071ed8e69e8db57169b9b0b8d3b0e1e858a4a28a068a9c10d3dd
snefru256 64 604fdd7a69596bcfed9ab03cd1486616b7ec7102760b03fbe1c992497388b0ae
gost-crypto 64 01f377875a21d2d1cf796ef9cac8ae096abb194a11d49ab2032d2fd99e4fc393
gost 64 8642fb808e0cc26fccb5bd8e3ad7b97548cc61948c89076f28af03dcbe916937
snefru 64 604fdd7a69596bcfed9ab03cd1486616b7ec7102760b03fbe1c992497388b0ae
ripemd256 64 c3e5c58368b81fff8e5af7e068a34ea196b46220de2160a268857a0c8dc5d0a4
sha3-256 64 a2fd14675b9e4427cb66663f91d6cadfb9f7c7ab9b44b3bfe110d236a5f317d0
sha512/256 64 1b56e2dc5d353404fa231f4874b06e0bf83921742d068e9f64031477f8c65ca0
sha256 64 63479ad69a090b258277ec8fba6f99419a2ffb248981510657c944ccd1148e97
haval256,5 64 4b581f86813b43be3459002877dadc767ba33e328c1a2cd5c29462cbc79dbfd1
ripemd320 80 ab2ddd51f1b74b10e4a165f22c31349d3bbda55b94d7f98721af33fba56e283c2fb19c61af117d36
sha3-384 96 6244b49a9f0f890506dfd96842f4cf535e685399fd35aae93be98a51877eb65f98e42f84b47a6c59ccee074f5292bb61
sha384 96 1b142cd342d1922d01e14c612493a8f8046502f204e71bf7c152011000cb4cf5567a34484cb3a4235856b3a16c646a76
whirlpool 128 40fa27389954c20f9bcbd9f50532be1f911415cc850811b60b99c8adcd85adcbf2a0d7eb59a216339ecebb3df4b3d6dc8be86598ccb3d7a60425bf093477d6a3
sha3-512 128 d9a57a0a363eb842c4af7522cd34896a5b65faf3795c0a5edcd1773e2f096aacef16dfaf7c4f5fad210aee975916d1d25992dce221ac851556469c44b22961cd
sha512 128 2e3fce77cf8c4c7478a96d207c1c39715892cac84a18cbec9b634f4bc22b390b48cd30a4df2e7ebbaee65c346a662c5be2d12441322f7a4bac821a382c4af091