RFC: Interclip codes as substrings of hashes #98
filiptronicek
started this conversation in
Ideas
Replies: 4 comments 3 replies
|
Idea about collisions: if two hashes are the same (obviously not hashes, but their respective substrings), just use more characters, producing 6+ character codes, which would have to be accounted for in all Interclip clients. |
1 reply
|
A big plus of this approach is that the client would know the interclip code even before sending the API request, making code resolutions instantaneous (local is always faster than a CDN). We could also enable autocompletions on 4 letter codes if there's only one matching the first 4 characters of the hash. |
0 replies
|
sha1 to 512 is not as performant as a random string 😄 they need more memory to compute it! Even its 10 times slower than md5 🤣 |
2 replies
|
This is now fully implemented, thanks for all the input! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Hi, all! Filip has ideas, and it is only suiting, for the next generation of Interclip to feature brand new things, here's one I produced today, and I would love to hear your thoughts!
After revisiting an idea from an interview to STC I figured why not make Interclip codes not random? They could be 5-letter substring of a sha256 hash of the URL itself, making codes immutable even after their expiration. Maybe we could also use sha1, like git does, with tools like GitHub mostly showing just the first 7 characters of codes (it is possible to have reliable hashes with 5 characters? What about collisions?)
All reactions