Apple is ensuring the secondary market success of iPhones by building secure data wipe into the 2.0 version of its software, according to AppleInsider. Several sources report the Gold Master versions of the software could be released internally at Apple and possibly to developers as early as Friday.

Citing “People familiar with the beta versions of iPhone Software v2.0,” the AppleInsider report says the upcoming release will employ a more foolproof method of erasing all personal data and settings from an iPhone. As is the case with the existing version of iPhone software, the function will be accessible by selecting Settings > General > Reset > Erase All Contents and Settings.

Unlike today’s iPhone software the revised function will wipe data in similar fashion to the “Secure Empty Trash” function of Mac OS X, by which all data is deleted, unlinked, and then overwritten several times to make it irretrievable by even the savviest of recovery tools.

This feature should be welcome to anyone looking to sell their first-gen iPhone and upgrade to the 3G model, as well as to those who will follow the same path with subsequent iterations of the phone.

The caveat is that the new method will take considerably longer than the method available by the current software version, but time seems a small price to pay for piece of mind.