Refactor cipher to discard secrets ASAP.