Move encryption handler to application component