According to an investigative report by New Zealand's 1 news, airport customs officials routinely force up to two travelers each day to give up their electronic devices and passwords for searching. According to the customs agents, the program is designed to look for smugglers by performing a "digital strip search" on the phones and laptops of travelers. This does not require a court order, but the agents do claim to adhere to New Zealand's privacy act.
The searches can be quick or much more extensive depending on the level of danger perceived. One traveler was stopped for five hours and claims he was "made to feel like a terrorist" on his way home from Bali. Agents typically just peruse the data looking for any red flags but they have admitted to also copying it and passing it along to the government and police. According to the customs general manager, agents can seize travelers' devices at any moment and they have tools to break some types of encryption if it is encountered.
Since 2015 more than 1,300 people have been stopped and searched at New Zealand's three biggest airports. Of these, just under 300 were actually from New Zealand. Chinese and Taiwanese travelers accounted for 360 searches as well. If travelers refuse to comply, a bill is currently being considered by parliament to fine them up to $5,000.
The vast majority of travelers are on a strict timeline and nobody is going to plan in their itinerary for a five hour digital strip search. This leaves travelers with just two options: comply, or don't expect to fly. Government privacy activists recommend seeking legal advice before handing over credentials.