Can we DRY this up? Maybe just leave the case pattern and use `if (status == FINISHED) publishEvent()`. Also we should DRY the behavior up between `encrypt` and `decrypt`.