Add cipher mode to struct and use it.