5 ms·
you have to drag this table around in all code that uses the protocol and remember to update it all the time Won't some kind of table always be necessary unles
by panic 10y ago
you have to drag this table around in all code that uses the protocol and remember to update it all the time
Won't some kind of table always be necessary unless the type contains actual bytecode implementing the hash algorithm?
- LeoPanthera 10y agoFor a few extra bytes you could have the ASCII name of the hash function. "sha256" is pretty clear, for example.
- jnwatson 10y agoAnd then your code would still need a table mapping the string to the implementation.
- _prometheus 10y agoyep, exactly :)
- smsm42 10y agoYes, but that's just one table - for implementations that are supported by code. I don't need the table to just understand what this hash is - only to verify it. And, if I want to add my private hash, I don't need to update shared tables and be worried some other hash would have the same ID as mine. I can just use reasonably unique string.
- LeoPanthera 10y agoBut at least you could work out the mapping in your head, without having to refer to a numeric table.
- RubyPinch 10y agoIt still needs a table, but it doesn't need consensus on what those names mean. If someone says "sha2", that doesn't mean bcrypt, after all!