Another inconvenient fact is sometimes it does work, and is an alternative to actual harm.
ETA: I'm surprised at how many here adhere to the notion "you can't ever know if the subject knows". We justifiably incarcerate people in peacetime, and kill people in war, on less information. As another poster noted: if the subject possesses a computer clearly connected with the issue, admits it's his, admits he knows the password, refuses to give the password, reveals the password under enhanced interrogation (with no physical harm done), and the password decrypts life-saving information, far better that than letting innocents die (or killing him putatively after the fact) because "torture isn't nice". Unwavering equalization of torture with crime (and invariant punishment thereof) is just as absurd as invariably criminalizing use of deadly force in defense of self or others. I get that sometimes/often/usually it doesn't work, but this broad insistence it is always criminal is absurd.