Refactored CCipher