4 ms·
The answer is unfortunately a bit boring :'( I was hoping for some cool story with some deep easter egg.. But no. <spoiler>It's just that non-existing hex cha
by GekkePrutser 6y ago
The answer is unfortunately a bit boring :'( I was hoping for some cool story with some deep easter egg.. But no.
<spoiler>It's just that non-existing hex chars are replaced by 0's :P</spoiler>
- kibwen 6y agoNo, the full algorithm is actually fascinating in how utterly absurd it is. I'll use the example from the primary source, https://scrappy-do.blogspot.com/2004/08/little-rant-about-microsoft-internet.html https://scrappy-do.blogspot.com/2004/08/little-rant-about-mi... . 1. Start with some random string: 6db6ec49efd278cd0bc92d1e5e072d68 2. Pad the end of the string with zeroes until the length is a multiple of 3: 6db6ec49efd278cd0bc92d1e5e072d680 3. Split the string into equal thirds: 6db6ec49efd, 278cd0bc92d, 1e5e072d680 4. Counting from the end (?!) of each third, truncate to eight (??) characters: 6ec49efd, cd0bc92d, e072d680 5. Counting from the beginning of each segment, truncate to two characters: 6e, cd, e0 And that's how a string like "6db6ec49efd278cd0bc92d1e5e072d68" turns, unbelievably, into a hex value of "#6ecde0".
- GekkePrutser 6y agoLol I only glanced over the source article, not sure if it mentioned all this. But inded. It is absurd :D Thanks for the explanation, it was really a good laugh! I wonder what they were thinking at netscape.. Why not just ignore invalid values... :/ And of course some words are actually parsed as valid values (like red, blue etc) which makes it even more complex.