erkl
Joined 13 years ago
Joined 13 years ago
I have to say it feels a bit weird to deduct points (so to speak) from a highly regarded cryptographic hash function because it doesn't outright prevent one particular, broken MAC generation scheme, but I guess the argument has some merit.
While I think it's harmless to say that SHA-512/256 is stronger than SHA-256 (as they otherwise provide the same theoretical level of security), I still think it's wrong to claim that SHA-512/256 is also stronger than SHA-512, which has a vastly greater theoretical security margin.
Just use a MAC algorithm that isn't terrible.
In this particular case, returning 0 doesn't necessarily indicate failure. Binding a socket to port 0 means you're asking the operating system to pick an available port for you, which one might argue is a reasonably safe default for unknown address families.
typeof x; // throws an error
let x = 1;
This doesn't: typeof x; // returns "undefined"
var x = 1;
While using variables before declaring them is bad practice, I think it's fair to argue that this behaviour is inconsistent.> cp -R $GOROOT/src/pkg/net/http ./net/http
Then simply change all "net/http" imports to "./net/http". Now you're free to carry out any changes you'd like.
P.S: Just because you can do this doesn't mean you should.