The Bluetooth Explorer app from the dev tools (/Developer/Applications/Utilities/Bluetooth/) allows you to turn off Simple Pairing on your device. (Run the app, select menu item: “Utilities>Get Local Device Info”, and click on the “Simple Pairing” tab).
How would a 3rd-party application do this?
If you don’t mind using some private stuff, you can do it like this: