Generalizes SHA-3 code for SHAKE support and uses GHC type-level literals to keep the output length variable.