modify encrypt mode