Passcodes and data protection

For security, you can set a passcode that you must enter each time you turn on or wake up iPhone, or when you access the passcode lock settings.

Setting a passcode turns on data protection, which uses your passcode as the key for encrypting mail messages and attachments stored on iPhone. (Some apps available from the App Store may also use data protection.) A notice at the bottom of the Passcode Lock screen in Settings shows that data protection is enabled.

Important:  On an iPhone 3GS that didn’t ship with iOS 4 or later, you must also restore iOS software to enable data protection. See Updating and restoring iPhone software.

See Passcode Lock.