This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:md5 [2012-07-03 13:53] – [MD5 rebase] roland | notes:md5 [2019-02-10 21:07] (current) – [UPDATE (2018-04-06)] roland | ||
---|---|---|---|
Line 7: | Line 7: | ||
I rather wanted to create a random looking string which isn't easy to tamper with while still being " | I rather wanted to create a random looking string which isn't easy to tamper with while still being " | ||
- | What I was looking for is something similiar to Youtube' | + | What I was looking for is something similiar to Youtube' |
===== MD5 rebase ===== | ===== MD5 rebase ===== | ||
Line 40: | Line 40: | ||
===== ID encryption ===== | ===== ID encryption ===== | ||
- | An alternative might be the encryption of a numeric ID end and rebasing this to anything from base16 to base64. An example | + | An alternative might be the encryption of a numeric ID and rebasing this to anything from base16 to base64. An example |
- | ~~DISCUSSION|Comments~~ | + | ===== UPDATE (2018-04-06) ===== |
+ | |||
+ | 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, | ||
+ | } | ||
+ | |||
+ | </ |