Hong Kong has tightened enforcement rules of its national security law, imposing sanctions against those who refuse to provide passwords for electronic devices.