3 ms·
Perhaps this is just my Stack Overflow reflexes, but: The string argument to SuperSecretPasswordProtectedStuff() should be const (reference, perhaps even) and
by unwind 13y ago
Perhaps this is just my Stack Overflow reflexes, but:
The string argument to SuperSecretPasswordProtectedStuff() should be const (reference, perhaps even) and of course printf() shouldn't be used in C++.
It's ... fun and interesting that such a super-minimal example of source code (from a research professor for crying out at 200 dB(A)) has those kinds of "sloppiness indicators" in it.
Or am I just being grumpy?
Regardless, I'm glad to see someone trying to shed some proper light over the obfuscation research, I too was underwhelmed by Wired's coverage. I'm more or less clueless when it comes to all things security-related, though.
- ttctciyf 13y agoEven grumpy people should be able to distinguish pseudocode from c++, I'd have hoped! But yeah, great article, imho, in that it clarified these concepts a lot for me, as a non-crypto person.
- unwind 13y agoWhoever writes "printf()" in pseudo-code though, and bothers with newline characters? I would expect "print" or something but of course there's no standard for psuedo-code.
- ttctciyf 13y agoI dunno, but not the author of that piece, as far as I can see; the only printf() in there is in the occc entry, isn't it? Maybe your stackoverflow neurons put the extra 'f' in the pseudocode print() calls, or maybe the author edited it after seeing your comment :)
- comex 13y agoEh, I wouldn't say either of those are universally accepted practices. printf has a much nicer interface than iostream (there's a reason most newer languages have a printf-compatible formatting routine), and marking local variables const (not pointer to const) can be seen as unnecessary verbosity.
- Shorel 13y agoI was going to argue with you about printf in C++, (I use it instead of streams, purely because I irrationally hate them); but I have not unwind-protect in my interpreter.