Added encrypt mode as a flage option