Classic protocol and crypto cleanups.

No. Hiding conditionals within assignments is bad (personal opinion), but necessary /sometimes/ to avoid big duplications. Here the intent is much clearer with a switch statement.