3 ms·
If one could remove spaces from JSON to create a so-called "Canonical JSON" one could obtain the same digest hash from the same data (even in combination with t
by jasonzemos 8y ago
If one could remove spaces from JSON to create a so-called "Canonical JSON" one could obtain the same digest hash from the same data (even in combination with the hardware accelerated hashing offered by AVX!). Admittedly this is a strange case but I've run into it.
- jandrese 8y agoIsn't this a problem if you're fed these two inputs: {mystring:"Hello World!"} {mystring:"Hello World !"} They aren't the same JSON.
- marvy 8y agoalso: {mystring:"HelloWorld!"}
- amenghra 8y agoTypically, when you want a canonical JSON you don't want to touch strings and you want to sort maps.