New Zealand has passed a law under which visitors will be fined up to $5000 NZ if they refuse to give password access to their electronic devices to customs officials.

The Customs and Excise Act 2018 gives officials authorisation to access personal information including codes, passwords, encryption keys and any related information that enables access to an electronic device. 

A spokesperson for New Zealand Customs said to CNN this was an absolutely necessary measure, as majority of prohibited material and documents are now stored electronically.