What Big Caliber says is what I was taught in my CCW class. In addition, I was told that the ammo must be in a separate container from the locked one with the gun(s). (Why locking the ammo with the gun is a crime boggles my mind).
BTW, it is a felony in California to not do this properly, so do it right and don't cut corners. LOCK the box that the gun is in and store the ammo SEPARATELY. In addition, I'd recommend storing the locked gun box (assuming it looks like one) out of sight so that LE does not have probably cause to perform a search. Which means it will be highly unlikely you have to even deal with the issue.