Yes, you can use either brand on the other one's hotshoe, and the flash will fire in sync with the exposure being made. But that's the only function you will have. No i-TTL/e-TTL, no high-speed sync (FP), no menu commanding of the flash, no flash exposure compensation, no wake-up from sleep, no 2nd curtain, no matching the zoom to the lens's focal length—anything that requires communication between the flash and the camera body other than the "fire!" signal won't be communicated.
If you look at the camera's hotshoe and the flash's foot, you'll see why. Nearly every camera manufacturer follows the ISO standard for flash hotshoes (for a while Sony didn't, using the old Minolta proprietary hotshoe, but as of the NEX6, they've moved to an iso-compliant shoe as well). This standard gives the physical dimensions of the foot and shoe, and specifies that the rails on the shoe are ground, and that the contact in the center of the "square" of the foot/shoe is the sync signal.
Everything else is proprietary. Canon and Nikon have their non-sync contacts/pins placed in different areas, so if the flash is seated correctly on the hotshoe, there is no electrical contact and no communication.
However. The four-thirds, micro four-thirds, Fuji X, and Canon hotshoe contacts all use identical placement (although Canon has an additional signal not found on the other two), so if you mix brands among these three, there is the possibility of cross-talk. And since every brand uses a completely different signaling protocol, there could be some errors and possible damage (although the risk is small), so if you're very paranoid, taping over contacts or removing pins might be advisable. I pulled the TTL pins (completely reversible) on an SB-26 to use it on my Canon hotshoes.
On the upside, however, this similar placement also means you can use Canon TTL cables for full TTL function with OEM gear (i.e., you can use a micro four-thirds flash with a micro four-thirds camera over a Canon TTL cable and have full function with TTL and high-speed sync); but this only works with passive cables simply doing signal pass-through. It does not work with TTL-capable radio triggers.
Sync voltages, if you are using digital-era flash models, should not be an issue. All the digital-era flashes tend to have sync voltages of <10V, and most Canon/Nikon hotshoes have a limit of 250V, while mirrorless cameras are guesstimated to have limits around 20V. The 6V limit you often seen in web references are for the first generation of Canon dSLRs. If you have a Canon camera model that was made after the original dRebel (300D), the limit is 250V.