A rewrite of the SHA256AutoDetect function with some macroing to conditionally declare variables only if they are actually going to be used.
This removes multiple static analyzer complaints about dead stores (variables given a value and then discarded without reading the value ever).
It is also a slight clean-up as the (void)var; hacks are no longer necessary.