I think you misunderstand my point: torture should be banned. But if a TLA* agent was in the unlikely scenario of "A nuke is going to go off in LA in 30 seconds what's the disarm code TICK TOCK TICK TOCK" I and I think most people would understand and forgive the illegal use or torture in this extraordinary and highly unlikely scenario. This is a good reason to have a presidential pardon available, but have laws to regulate the scenarios that are much more likely such as the one you mentioned.
* Three Letter Acronym [ Parent ]