HASH_FLAGS_ALGO_MASK
u32 alg = (state->flags & HASH_FLAGS_ALGO_MASK) >> HASH_FLAGS_ALGO_SHIFT;
switch ((state->flags & HASH_FLAGS_ALGO_MASK) >>