6 ms·
Maybe you could split the ID into two parts: the first is an encrypted integer representing the DB row, the second is a "password" for the video. Then you get f
by shawnz 6y ago
Maybe you could split the ID into two parts: the first is an encrypted integer representing the DB row, the second is a "password" for the video. Then you get fast indexing but you still can't enumerate videos without the ID.
- firloop 6y agoIn this scheme, how do you look up a row in the DB by the resulting encrypted ID?
- shawnz 6y agoYou store the key in the source code as in the other poster's description of Youtube 1.0. So employees/contractors/etc could still see the number of total videos and sequential order of uploads, but at least they can't enumerate them. You could also maybe rotate the key once in a while, but only for videos created after the rotation, and indicate the "key version" with a third field in the video ID
- saurik 6y agoI would recommend a computed index (given that scheme, if you liked it; I don't, but it doesn't matter).