The bottom line is that you need to get 1 letter from the alphabet and numbers based on a certain string

I tried to take the first character md5 / sha512 - the first character did not cover all 40 characters, there were about 15

  • in general, the md5 / sha512 algorithms themselves produce a binary string with 256 values ​​per byte. If you had "about 15," then you used the hexadecimal representation of the hash. Try using php.net/manual/ru/function.hash.php with the $ raw_output = true parameter. get the binary data, you can transfer it for example to base64. true there are two extra characters in it except letters and numbers - Mike
  • and what kind of alphabet together with numbers forms a set of 40 characters? Russian 31 + 10, or 33 + 10. Latin 26 + 10. - Lexx918

0