Is torture wrong? Of course it is. Purposefully treating any human as he or she had no rights and abusing them in any way is just wrong, no matter what code you evaluate your life by.
I commend you.
What if you know with 100% certainty that a bomb has been planted in a day care with 1000 4 year olds in it and that it will be detonated in 30 minutes. What if there is no possible way to evacuate the building completely before it goes off. What if you know with 100% certainty that the single individual you have in your presence knows where the bomb is and how to defuse it. What if he flat out refuses to divulge the information you need to save those children?
If that scenario played out, then I suppose I would have to do whatever necessary to save those children, even if it was something I knew i'd regret.