Decompressing airlocks by opening of the outer doors is undesirable as you will lose some of your precious oxygen to the vast emptiness of space. Besides, pressure equalization by opening the hatches may be explosive in nature, as the rate at which the pressure equalizes is uncontrollable. Explosive decompression might cause damage to equipment as well as severe injury or even death.
The airlocks hatches shall therefore either open inward (similar to what you'll see on submarines or decompression chambers) or have a pure mechanical interlock which prevents opening the hatches unless the airlock pressure has already been equalized.
During normal operation, the airlocks will be equalized by using an equalization compressor which will evacuate the air from the airlock and store it on a tank. The equalization compressor shall be equipped with emergency push buttons both on the inside and the outside of the airlock, which will stop the compressor and open a valve to bleed the air back into the airlock from the air tank.
There will be mechanical valves for emergency equalization of pressure between space and inside the airlock, as well as from within the airlock and to the interior of the spacecraft. The mechanical valves will require specialized tools for operation. 35
The valves for equalizing between space and within the airlock can only be operated from the outside or from within the airlock. Similarly, the valves for equalizing between the airlock and the spacecraft interior may only be operated from within the airlock or the spacecraft itself.
Obviously someone from the outside will have the theoretical possibility of bleeding out the airlock against the will of the crew of the space craft, but this is mostly a hypothetical situation which does not warrant any particular countermeasures unless it first proves to become a issue.
The requirements for safe design and operation of airlocks will be a part of the SOLIS-code (Safety Of Life In Space) sanctioned by the International Space Organization (similar to International Maritime Organization) which is an organization consisting of the different governmental space agencies of nations with vested interest in space operations. The codes will require periodic inspection of the safety functions of the space craft. The national space agencies will have the authority to inspect and to place any space craft that does not meet the SOLIS-codes under arrest until the spacecraft is up to standard. The governmental agencies can also blacklist space crafts and impose sanctions on the space craft owners in case they attempt to bypass the inspections by never docking in a regulated space port. 35