This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| notes:md5 [2019-02-10 21:03] – [MD5 and shorter hashing techniques] roland | notes:md5 [2019-02-10 21:07] (current) – [UPDATE (2018-04-06)] roland | ||
|---|---|---|---|
| Line 45: | Line 45: | ||
| After revisiting this article, I found a very detailed post about Youtube Video IDs here: [[https:// | After revisiting this article, I found a very detailed post about Youtube Video IDs here: [[https:// | ||
| + | |||
| + | ===== UPDATE (2019-02-10) ===== | ||
| + | |||
| + | Tom wrote: | ||
| + | |||
| + | [...] After scouring the web and stack overflow it was by far the simplest solution I could find. One thing I might suggest is working from the raw md5 output (rather than re-packing it) and remove undesirable characters. | ||
| + | |||
| + | < | ||
| + | |||
| + | function tinymd5($str, | ||
| + | // remove vowels to prevent undesirable words and similarly + / which may be problematic | ||
| + | $remove = array(' | ||
| + | return str_pad(substr(str_replace($remove, | ||
| + | } | ||
| + | |||
| + | </ | ||