I
I
instla2018-10-02 14:37:38
PHP
instla, 2018-10-02 14:37:38

How to generate a hash in php?

It is necessary to generate a hash that has a minimum number of collisions
Tried hexdec(crc32()), but it gives duplicates, pp

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2018-10-02
@Stalker_RED

There are many hashing functions in php, which differ both in hash length and in speed and purpose.
php.net/manual/en/refs.crypto.php
If you need a unique id, then php.net/manual/en/function.uniqid.php
If you need passwords, then here: php.net/manual/en/faq. passwords.php

A
Anton Shamanov, 2018-10-02
@SilenceOfWinter

hash\hash_hmac and remove regular digit. crc32 not generating numeric hash

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question