refactored cipher tests